aboutsummaryrefslogtreecommitdiff
path: root/src/aobutton.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2020-05-22 02:14:54 +0300
committerCrystalwarrior <varsash@gmail.com>2020-05-22 02:14:54 +0300
commit88de4cde0433ef5e606f38a2f1e6041f0d24a87e (patch)
treece57adab0e3a236a93d112f33235638b74502040 /src/aobutton.cpp
parentc8e12558cdd3fd0769b81679ad09edf1f29b780f (diff)
clang 2 electric boogaloo
{ BasedOnStyle: LLVM, BreakBeforeBraces: Stroustrup}
Diffstat (limited to 'src/aobutton.cpp')
-rw-r--r--src/aobutton.cpp44
1 files changed, 25 insertions, 19 deletions
diff --git a/src/aobutton.cpp b/src/aobutton.cpp
index 05dedc16..dc2d8817 100644
--- a/src/aobutton.cpp
+++ b/src/aobutton.cpp
@@ -3,30 +3,36 @@
#include "debug_functions.h"
#include "file_functions.h"
-AOButton::AOButton(QWidget *parent, AOApplication *p_ao_app) : QPushButton(parent)
+AOButton::AOButton(QWidget *parent, AOApplication *p_ao_app)
+ : QPushButton(parent)
{
- ao_app = p_ao_app;
+ ao_app = p_ao_app;
}
-AOButton::~AOButton()
-{
-}
+AOButton::~AOButton() {}
void AOButton::set_image(QString p_image)
{
- QString image_path = ao_app->get_static_image_suffix(ao_app->get_theme_path(p_image));
- QString default_image_path = ao_app->get_static_image_suffix(ao_app->get_default_theme_path(p_image));
+ QString image_path =
+ ao_app->get_static_image_suffix(ao_app->get_theme_path(p_image));
+ QString default_image_path =
+ ao_app->get_static_image_suffix(ao_app->get_default_theme_path(p_image));
- if (file_exists(image_path)) {
- this->setText("");
- this->setStyleSheet("QPushButton { border-image: url(\"" + image_path + "\") 0 0 0 0 stretch stretch; }"
- "QToolTip { background-image: url(); color: #000000; background-color: #ffffff; border: 0px; }");
- }
- else if (file_exists(default_image_path)) {
- this->setText("");
- this->setStyleSheet("QPushButton { border-image: url(\"" + default_image_path + "\"); }"
- "QToolTip { background-image: url(); color: #000000; background-color: #ffffff; border: 0px; }");
- }
- else
- return;
+ if (file_exists(image_path)) {
+ this->setText("");
+ this->setStyleSheet("QPushButton { border-image: url(\"" + image_path +
+ "\") 0 0 0 0 stretch stretch; }"
+ "QToolTip { background-image: url(); color: #000000; "
+ "background-color: #ffffff; border: 0px; }");
+ }
+ else if (file_exists(default_image_path)) {
+ this->setText("");
+ this->setStyleSheet("QPushButton { border-image: url(\"" +
+ default_image_path +
+ "\"); }"
+ "QToolTip { background-image: url(); color: #000000; "
+ "background-color: #ffffff; border: 0px; }");
+ }
+ else
+ return;
}