summaryrefslogtreecommitdiff
path: root/core/settings/light-and-power/light.cpp
authorllornkcor <llornkcor>2002-07-21 12:45:31 (UTC)
committer llornkcor <llornkcor>2002-07-21 12:45:31 (UTC)
commitedeab5f635166d88eee8135d982602a241240f40 (patch) (unidiff)
tree6081d12cb81c17b660b43474c94d2ffe916ddb0a /core/settings/light-and-power/light.cpp
parent76d7938ec6b89aa11f54f9fbdad40bb358b4886a (diff)
downloadopie-edeab5f635166d88eee8135d982602a241240f40.zip
opie-edeab5f635166d88eee8135d982602a241240f40.tar.gz
opie-edeab5f635166d88eee8135d982602a241240f40.tar.bz2
default dim time should be less than light off time
Diffstat (limited to 'core/settings/light-and-power/light.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp14
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
@@ -58,9 +58,9 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl )
58 config.setGroup( "Screensaver" ); 58 config.setGroup( "Screensaver" );
59 59
60 int interval; 60 int interval;
61 interval = config.readNumEntry( "Interval_Dim", 30 ); 61 interval = config.readNumEntry( "Interval_Dim", 20 );
62 interval_dim->setValue( interval ); 62 interval_dim->setValue( interval );
63 interval = config.readNumEntry( "Interval_LightOff", 20 ); 63 interval = config.readNumEntry( "Interval_LightOff", 30 );
64 interval_lightoff->setValue( interval ); 64 interval_lightoff->setValue( interval );
65 interval = config.readNumEntry( "Interval", 60 ); 65 interval = config.readNumEntry( "Interval", 60 );
66 if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs) 66 if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs)
@@ -100,7 +100,7 @@ void LightSettings::reject()
100void LightSettings::accept() 100void LightSettings::accept()
101{ 101{
102 if ( qApp->focusWidget() ) 102 if ( qApp->focusWidget() )
103 qApp->focusWidget()->clearFocus(); 103 qApp->focusWidget()->clearFocus();
104 104
105 applyBrightness(); 105 applyBrightness();
106 106
@@ -119,7 +119,7 @@ void LightSettings::accept()
119 config.writeEntry( "Interval_LightOff", interval_lightoff->value() ); 119 config.writeEntry( "Interval_LightOff", interval_lightoff->value() );
120 config.writeEntry( "Interval", interval_suspend->value() ); 120 config.writeEntry( "Interval", interval_suspend->value() );
121 config.writeEntry( "Brightness", 121 config.writeEntry( "Brightness",
122 (brightness->maxValue()-brightness->value())*255/brightness->maxValue() ); 122 (brightness->maxValue()-brightness->value())*255/brightness->maxValue() );
123 config.write(); 123 config.write();
124 124
125 QDialog::accept(); 125 QDialog::accept();
@@ -128,13 +128,13 @@ void LightSettings::accept()
128void LightSettings::applyBrightness() 128void LightSettings::applyBrightness()
129{ 129{
130 int bright = (brightness->maxValue()-brightness->value())*255 130 int bright = (brightness->maxValue()-brightness->value())*255
131 / brightness->maxValue(); 131 / brightness->maxValue();
132 set_fl(bright); 132 set_fl(bright);
133} 133}
134 134
135 135
136void LightSettings::done(int r) 136void LightSettings::done(int r)
137{ 137{
138 QDialog::done(r); 138 QDialog::done(r);
139 close ( ); 139 close ( );
140} 140}