aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp3
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp9
2 files changed, 6 insertions, 6 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp
index af081191..ee379613 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp
@@ -1,6 +1,6 @@
//===========================================
// Lumina-DE source code
-// Copyright (c) 2014, Susanne Jaeckel
+// Copyright (c) 2014, Susanne Jaeckel, 2015-2016 Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
@@ -81,6 +81,7 @@ void LBattery::updateBattery(bool force){
LSession::handle()->playAudioFile(LOS::LuminaShare()+"low-battery.ogg");
}
if(icon==0){ label->setStyleSheet("QLabel{ background: red;}"); }
+ else if(icon==14 && charge>98){ label->setStyleSheet("QLabel{ background: green;}"); }
else{ label->setStyleSheet("QLabel{ background: transparent;}"); }
iconOld = icon;
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%
bgstack15