Skip to content

Commit

Permalink
Внесён фикс при первичной инициализации приложения
Browse files Browse the repository at this point in the history
для настройки внешнего вида при клике по иконке в системном трее.
  • Loading branch information
Legotckoi authored and Evgenii committed Jan 31, 2016
1 parent 279d5f3 commit 33e2e92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ecolorcore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void EColorCore::iconActivated(QSystemTrayIcon::ActivationReason reason)
{
switch (reason){
case QSystemTrayIcon::Trigger:
popUpColor->show();
(!popUpColor->isVisible())? popUpColor->show() : popUpColor->hide();
break;
default:
break;
Expand Down
6 changes: 3 additions & 3 deletions src/popupcolor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ PopUpColor::PopUpColor(QWidget *parent) : QWidget(parent)
comboBox.setCurrentIndex(0);
layout.addWidget(&comboBox,1,1,1,2);

reloadSettings();
setCurrentColor(QColor(Qt::white));

connect(&comboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &PopUpColor::changeIndexComboBoxColor);
connect(&label, &CodeLabel::setPos, this, &PopUpColor::showPos);
connect(&closeButton, &QToolButton::clicked, this, &PopUpColor::hide);
Expand All @@ -52,6 +49,9 @@ PopUpColor::PopUpColor(QWidget *parent) : QWidget(parent)
connect(&dummyTransparentWindow, &TransparentWindow::changeColor, this, &PopUpColor::setCurrentColor);
connect(&dummyTransparentWindow, &TransparentWindow::backColor, this, &PopUpColor::backColor);
connect(&dummyTransparentWindow, &TransparentWindow::saveColor, this, &PopUpColor::slotCopyBuffer);

reloadSettings();
setCurrentColor(QColor(Qt::white));
}

PopUpColor::~PopUpColor()
Expand Down

0 comments on commit 33e2e92

Please sign in to comment.