mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 16:09:35 -05:00
added correct icons in ToasterStatus
This commit is contained in:
parent
b382c3e846
commit
3d58f9b2b1
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user