added correct icons in ToasterStatus

This commit is contained in:
csoler 2016-01-19 22:35:58 -05:00
parent b382c3e846
commit 3d58f9b2b1
2 changed files with 8 additions and 6 deletions

View File

@ -25,9 +25,9 @@
#include "SysTrayStatus.h"
#define IMAGE_NOONLINE ":/images/logo/logo_24_0.png"
#define IMAGE_ONEONLINE ":/images/logo/logo_24_1.png"
#define IMAGE_TWOONLINE ":/images/logo/logo_24_2.png"
#define IMAGE_NOONLINE ":/icons/logo_0_connected_128.png"
#define IMAGE_ONEONLINE ":/icons/logo_1_connected_128.png"
#define IMAGE_TWOONLINE ":/icons/logo_2_connected_128.png"
SysTrayStatus::SysTrayStatus(QWidget *parent) :
QWidget(parent)
@ -40,7 +40,6 @@ SysTrayStatus::SysTrayStatus(QWidget *parent) :
imageButton->setIcon(QIcon(IMAGE_NOONLINE));
imageButton->setFlat(true);
imageButton->setCheckable(false);
imageButton->setMaximumSize(24, 24);
imageButton->setFocusPolicy(Qt::ClickFocus);
hbox->addWidget(imageButton);

View File

@ -36,9 +36,12 @@ ToasterDisable::ToasterDisable(QWidget *parent)
hbox->setSpacing(0);
imageButton = new QPushButton(this);
int S = QFontMetricsF(imageButton->font()).height();
imageButton->setFlat(true);
imageButton->setCheckable(true);
imageButton->setMaximumSize(24, 24);
imageButton->setMaximumSize(S,S);
imageButton->setFocusPolicy(Qt::ClickFocus);
hbox->addWidget(imageButton);
@ -55,7 +58,7 @@ ToasterDisable::ToasterDisable(QWidget *parent)
void ToasterDisable::disable(bool isDisable)
{
imageButton->setIcon(QIcon(isDisable ? IMAGE_TOASTERDISABLE : IMAGE_TOASTERENABLE));
imageButton->setIcon(QPixmap(isDisable ? IMAGE_TOASTERDISABLE : IMAGE_TOASTERENABLE));
imageButton->setToolTip(isDisable ? tr("All Toasters are disabled") : tr("Toasters are enabled"));
imageButton->setChecked(isDisable);
}