diff options
author | Ken Moore <ken@pcbsd.org> | 2015-04-19 13:47:29 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-04-19 13:47:29 -0400 |
commit | e72395a608a739ebaf4e0a23595ea0918fa9af40 (patch) | |
tree | 42b537ee275bc9b08b4fbe8e4a55cd8a22f4de61 | |
parent | Merge pull request #87 from william-os4y/search (diff) | |
download | lumina-e72395a608a739ebaf4e0a23595ea0918fa9af40.tar.gz lumina-e72395a608a739ebaf4e0a23595ea0918fa9af40.tar.bz2 lumina-e72395a608a739ebaf4e0a23595ea0918fa9af40.zip |
Adjust te brightness control labelling a bit in the sytem dashboard. Now the label will always stay in sync with the slider (no delay), it is only the backend setting routine which is on a slight (50ms) delay.
-rw-r--r-- | lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp b/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp index 08ab49d0..b470f191 100644 --- a/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp +++ b/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp @@ -15,7 +15,7 @@ LSysMenuQuick::LSysMenuQuick(QWidget *parent) : QWidget(parent), ui(new Ui::LSys settings = new QSettings("panel-plugins","systemdashboard"); brighttimer = new QTimer(this); brighttimer->setSingleShot(true); - brighttimer->setInterval(100); //100ms delay in setting the new value + brighttimer->setInterval(50); //50ms delay in setting the new value //Now reset the initial saved settings (if any) LOS::setScreenBrightness( settings->value("screenbrightness",100).toInt() ); //default to 100% LOS::setAudioVolume( settings->value("audiovolume", 100).toInt() ); //default to 100% @@ -121,6 +121,11 @@ void LSysMenuQuick::brightSliderChanged(){ //Brightness controls cannot operate extremely quickly - combine calls as necessary if(brighttimer->isActive()){ brighttimer->stop(); } brighttimer->start(); + //*DO* update the label right away + int val = ui->slider_brightness->value(); + QString txt = QString::number(val)+"%"; + if(val<100){ txt.prepend(" "); } //make sure no widget resizing + ui->label_bright_text->setText( txt ); } void LSysMenuQuick::setCurrentBrightness(){ |