aboutsummaryrefslogtreecommitdiff
path: root/src/aobutton.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2020-05-22 01:18:24 +0300
committerCrystalwarrior <varsash@gmail.com>2020-05-22 01:18:24 +0300
commitc8e12558cdd3fd0769b81679ad09edf1f29b780f (patch)
tree7dae2225e574c3ee55d6b82a1d2f399db4ace5c0 /src/aobutton.cpp
parentdfac0652c8eb9bd48ceea7ae755e9c2f7e5cb1a2 (diff)
Clang-ify the code with this styling using Visual Studio Code:
{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Stroustrup, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All } (this is the Visual Studio preset with only "BreakBeforeBraces" changed from Allman to Stroustrup)
Diffstat (limited to 'src/aobutton.cpp')
-rw-r--r--src/aobutton.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/aobutton.cpp b/src/aobutton.cpp
index 9efe13d0..05dedc16 100644
--- a/src/aobutton.cpp
+++ b/src/aobutton.cpp
@@ -5,32 +5,28 @@
AOButton::AOButton(QWidget *parent, AOApplication *p_ao_app) : QPushButton(parent)
{
- ao_app = p_ao_app;
+ ao_app = p_ao_app;
}
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;
}
-