aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins/systemdashboard
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-01-30 13:19:57 -0500
committerKen Moore <ken@pcbsd.org>2015-01-30 13:19:57 -0500
commit6793d683ea0b7de7aefdefa3a7ad3f831d5fd2ea (patch)
tree5647a7081e6bab3728145013ceb1a0edc42bd342 /lumina-desktop/panel-plugins/systemdashboard
parentAdd the ability for the distribution defaults to use just the name of the sys... (diff)
downloadlumina-6793d683ea0b7de7aefdefa3a7ad3f831d5fd2ea.tar.gz
lumina-6793d683ea0b7de7aefdefa3a7ad3f831d5fd2ea.tar.bz2
lumina-6793d683ea0b7de7aefdefa3a7ad3f831d5fd2ea.zip
Oops, make sure that if brightness controls are not available, that the system dashboard hides that control option.
Diffstat (limited to 'lumina-desktop/panel-plugins/systemdashboard')
-rw-r--r--lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp b/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp
index 787ad0f0..1e28a72a 100644
--- a/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp
+++ b/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp
@@ -53,10 +53,16 @@ void LSysMenuQuick::UpdateMenu(){
if(ui->slider_volume->value()!= val){ ui->slider_volume->setValue(val); }
//Screen Brightness
val = LOS::ScreenBrightness();
- txt = QString::number(val)+"%";
- if(val<100){ txt.prepend(" "); } //make sure no widget resizing
- ui->label_bright_text->setText(txt);
- if(ui->slider_brightness->value()!=val){ ui->slider_brightness->setValue(val); }
+ if(val < 0){
+ //No brightness control - hide it
+ ui->group_brightness->setVisible(false);
+ }else{
+ ui->group_brightness->setVisible(true);
+ txt = QString::number(val)+"%";
+ if(val<100){ txt.prepend(" "); } //make sure no widget resizing
+ ui->label_bright_text->setText(txt);
+ if(ui->slider_brightness->value()!=val){ ui->slider_brightness->setValue(val); }
+ }
//Battery Status
if(LOS::hasBattery()){
ui->group_battery->setVisible(true);
bgstack15