diff options
author | Ken Moore <ken@ixsystems.com> | 2016-11-30 13:08:30 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2016-11-30 13:08:30 -0500 |
commit | d4f8bc41d53b85b1d3639fdc129f369e7f1b581e (patch) | |
tree | 77038edd76a52de551c8180612c127de8cb61d6d /src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp | |
parent | Get rid of the whitespace between mimetype registrations in the lumina-archiv... (diff) | |
download | lumina-d4f8bc41d53b85b1d3639fdc129f369e7f1b581e.tar.gz lumina-d4f8bc41d53b85b1d3639fdc129f369e7f1b581e.tar.bz2 lumina-d4f8bc41d53b85b1d3639fdc129f369e7f1b581e.zip |
Unify the icons used for battery indications within the start menu and battery plugin.
Also, add a green background to the battery plugin when the charge is 100% and still plugged in.
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index 260215ec..a34d09db 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -488,11 +488,10 @@ void StartMenu::on_stackedWidget_currentChanged(int val){ //Battery available - update the status button int charge = LOS::batteryCharge(); QString TT, ICON; - if(charge < 10){ ICON="-low"; } - else if(charge<20){ ICON="-caution"; } - else if(charge<40){ ICON="-040"; } - else if(charge<60){ ICON="-060"; } - else if(charge<80){ ICON="-080"; } + if(charge<=5){ ICON="-caution"; } + else if(charge<=20){ ICON="-040"; } + else if(charge<=70){ ICON="-060"; } + else if(charge<=90){ ICON="-080"; } else{ ICON="-100"; } if(LOS::batteryIsCharging()){ if(charge>=80){ ICON.clear(); } //for charging, there is no suffix to the icon name over 80% |