Skip to content

Commit

Permalink
Power plugin: fix call loop
Browse files Browse the repository at this point in the history
  • Loading branch information
justforlxz committed Jun 27, 2017
1 parent d7670f3 commit e26e275
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions plugins/Power/powerwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ namespace Plugins {

setStyleSheet("QLabel {"
"font: 14px;"
"}"
":hover {"
"QLabel {"
"color: red;"
"}");

m_powerInter = new DBusPower(this);
Expand Down Expand Up @@ -79,6 +83,8 @@ namespace Plugins {

m_enter = true;

m_battery->setStyleSheet("color: white;");

update();
}

Expand All @@ -88,6 +94,8 @@ namespace Plugins {

m_enter = false;

m_battery->setStyleSheet("color: black;");

update();
}

Expand All @@ -99,9 +107,6 @@ namespace Plugins {

if (m_enter) {
painter.fillRect(rect(), QColor("#1E90FF"));
m_battery->setStyleSheet("color: white;");
} else {
m_battery->setStyleSheet("color: black;");
}
}
}
Expand Down

0 comments on commit e26e275

Please sign in to comment.