aboutsummaryrefslogtreecommitdiff
path: root/src/aobutton.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-09-20 15:54:45 +0300
committerCrystalwarrior <varsash@gmail.com>2019-09-20 15:54:45 +0300
commitd3f23708c43bc132c322b778b2aa8d31a68d1c0c (patch)
treeecdc8ee551cb0614ad0285880eb7e14312df077a /src/aobutton.cpp
parent3899dbe0bd82875214ebd676130692120f89a412 (diff)
Revert buttons using setIcon and use a better stylesheet method instead
Fix evidence buttons and emote buttons being hardcoded size
Diffstat (limited to 'src/aobutton.cpp')
-rw-r--r--src/aobutton.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/aobutton.cpp b/src/aobutton.cpp
index d80226f2..9efe13d0 100644
--- a/src/aobutton.cpp
+++ b/src/aobutton.cpp
@@ -20,17 +20,15 @@ void AOButton::set_image(QString p_image)
if (file_exists(image_path))
{
- this->setIcon(QIcon(image_path));
- this->setIconSize(this->size());
- this->setStyleSheet("border:0px");
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->setIcon(QIcon(default_image_path));
- this->setIconSize(this->size());
- this->setStyleSheet("border:0px");
this->setText("");
+ this->setStyleSheet("QPushButton { border-image: url(\"" + default_image_path + "\"); }"
+ "QToolTip { background-image: url(); color: #000000; background-color: #ffffff; border: 0px; }");
}
else
return;