-rw-r--r-- | core/settings/light-and-power/light.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index b56ae11..e959603 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp @@ -49,27 +49,27 @@ extern int qpe_sysBrightnessSteps(); LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) : LightSettingsBase( parent, name, TRUE, fl ) { // Not supported auto_brightness->hide(); Config config( "qpe" ); config.setGroup( "Screensaver" ); int interval; - interval = config.readNumEntry( "Interval_Dim", 30 ); + interval = config.readNumEntry( "Interval_Dim", 20 ); interval_dim->setValue( interval ); - interval = config.readNumEntry( "Interval_LightOff", 20 ); + interval = config.readNumEntry( "Interval_LightOff", 30 ); interval_lightoff->setValue( interval ); interval = config.readNumEntry( "Interval", 60 ); if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs) interval_suspend->setValue( interval ); screensaver_dim->setChecked( config.readNumEntry("Dim",1) != 0 ); screensaver_lightoff->setChecked( config.readNumEntry("LightOff",1) != 0 ); LcdOffOnly->setChecked( config.readNumEntry("LcdOffOnly",0) != 0 ); int maxbright = qpe_sysBrightnessSteps(); initbright = config.readNumEntry("Brightness",255); brightness->setMaxValue( maxbright ); brightness->setTickInterval( QMAX(1,maxbright/16) ); @@ -91,50 +91,50 @@ static void set_fl(int bright) } void LightSettings::reject() { set_fl(initbright); QDialog::reject(); } void LightSettings::accept() { if ( qApp->focusWidget() ) - qApp->focusWidget()->clearFocus(); + qApp->focusWidget()->clearFocus(); applyBrightness(); int i_dim = (screensaver_dim->isChecked() ? interval_dim->value() : 0); int i_lightoff = (screensaver_lightoff->isChecked() ? interval_lightoff->value() : 0); int i_suspend = interval_suspend->value(); QCopEnvelope e("QPE/System", "setScreenSaverIntervals(int,int,int)" ); e << i_dim << i_lightoff << i_suspend; Config config( "qpe" ); config.setGroup( "Screensaver" ); config.writeEntry( "Dim", (int)screensaver_dim->isChecked() ); config.writeEntry( "LightOff", (int)screensaver_lightoff->isChecked() ); config.writeEntry( "LcdOffOnly", (int)LcdOffOnly->isChecked() ); config.writeEntry( "Interval_Dim", interval_dim->value() ); config.writeEntry( "Interval_LightOff", interval_lightoff->value() ); config.writeEntry( "Interval", interval_suspend->value() ); config.writeEntry( "Brightness", - (brightness->maxValue()-brightness->value())*255/brightness->maxValue() ); + (brightness->maxValue()-brightness->value())*255/brightness->maxValue() ); config.write(); QDialog::accept(); } void LightSettings::applyBrightness() { int bright = (brightness->maxValue()-brightness->value())*255 - / brightness->maxValue(); + / brightness->maxValue(); set_fl(bright); } void LightSettings::done(int r) { - QDialog::done(r); - close ( ); + QDialog::done(r); + close ( ); } |