summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-22 13:28:41 (UTC)
committer harlekin <harlekin>2002-10-22 13:28:41 (UTC)
commit514c76157fcf558300973fd4ffb4b131911ef257 (patch) (unidiff)
tree12d83b765344effb3eac799e3c4e128a2575f310
parent78152b3adbe3ae4626c8f53e3edd0babcaf6fb72 (diff)
downloadopie-514c76157fcf558300973fd4ffb4b131911ef257.zip
opie-514c76157fcf558300973fd4ffb4b131911ef257.tar.gz
opie-514c76157fcf558300973fd4ffb4b131911ef257.tar.bz2
fix for slider misbehaviour ( setting light preview )
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp8
-rw-r--r--core/settings/light-and-power/lightsettingsbase.ui4
2 files changed, 3 insertions, 9 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index 1a94209..d93b0af 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -74,7 +74,6 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl )
74 } 74 }
75 75
76 Config config( "qpe" ); 76 Config config( "qpe" );
77
78 config.setGroup( "Screensaver" ); 77 config.setGroup( "Screensaver" );
79 78
80 int interval; 79 int interval;
@@ -153,7 +152,7 @@ void LightSettings::slotSliderTicks( int steps ) {
153 152
154static void set_fl(int bright) 153static void set_fl(int bright)
155{ 154{
156 qDebug( QString("BRIGHT !! : %1").arg( bright ) ); 155 qDebug ( QString( "Brightness" ).arg( bright ) );
157 QCopEnvelope e("QPE/System", "setBacklight(int)" ); 156 QCopEnvelope e("QPE/System", "setBacklight(int)" );
158 e << bright; 157 e << bright;
159} 158}
@@ -240,7 +239,7 @@ void LightSettings::accept()
240 239
241void LightSettings::applyBrightness() 240void LightSettings::applyBrightness()
242{ 241{
243 if ( !PowerStatus::Online ) { 242 if ( PowerStatusManager::readStatus().acStatus() != PowerStatus::Online ) {
244 int bright = ( brightness->value() ) * 255 / brightness->maxValue(); 243 int bright = ( brightness->value() ) * 255 / brightness->maxValue();
245 set_fl(bright); 244 set_fl(bright);
246 } 245 }
@@ -248,9 +247,8 @@ void LightSettings::applyBrightness()
248 247
249void LightSettings::applyBrightnessAC() 248void LightSettings::applyBrightnessAC()
250{ 249{
251 qDebug( QString("SLIDER : %1").arg( brightness_ac_3->value() ) );
252 // if ac is attached, set directly that sliders setting, else the "on battery" sliders setting 250 // if ac is attached, set directly that sliders setting, else the "on battery" sliders setting
253 if ( PowerStatus::Online ) { 251 if ( PowerStatusManager::readStatus().acStatus() == PowerStatus::Online ) {
254 int bright = ( brightness_ac_3->value() ) * 255 / brightness_ac_3->maxValue(); 252 int bright = ( brightness_ac_3->value() ) * 255 / brightness_ac_3->maxValue();
255 set_fl(bright); 253 set_fl(bright);
256 } 254 }
diff --git a/core/settings/light-and-power/lightsettingsbase.ui b/core/settings/light-and-power/lightsettingsbase.ui
index 5e62626..be096ac 100644
--- a/core/settings/light-and-power/lightsettingsbase.ui
+++ b/core/settings/light-and-power/lightsettingsbase.ui
@@ -758,10 +758,6 @@
758 <name>tickmarks</name> 758 <name>tickmarks</name>
759 <enum>Right</enum> 759 <enum>Right</enum>
760 </property> 760 </property>
761 <property stdset="1">
762 <name>tickInterval</name>
763 <number>32</number>
764 </property>
765 </widget> 761 </widget>
766 <widget> 762 <widget>
767 <class>QLayoutWidget</class> 763 <class>QLayoutWidget</class>