summaryrefslogtreecommitdiff
authorharlekin <harlekin>2004-06-04 16:08:25 (UTC)
committer harlekin <harlekin>2004-06-04 16:08:25 (UTC)
commite3982ce0959fe630709aeba25f4c6d93df150ff5 (patch) (unidiff)
tree8ed3dce7a96645d25a00f1819f6aa0e37bc0abc2
parent9f12abfa6b60232592aa15feea25bee28908f525 (diff)
downloadopie-e3982ce0959fe630709aeba25f4c6d93df150ff5.zip
opie-e3982ce0959fe630709aeba25f4c6d93df150ff5.tar.gz
opie-e3982ce0959fe630709aeba25f4c6d93df150ff5.tar.bz2
default focus back on the brightness sliders, closes bug 1340
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp3
-rw-r--r--core/settings/light-and-power/lightsettingsbase.ui17
2 files changed, 17 insertions, 3 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index 424a64c..1c61787 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -121,12 +121,13 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags )
121 int contr = m_oldcontrast = config. readNumEntry ( "Contrast", 127 ); 121 int contr = m_oldcontrast = config. readNumEntry ( "Contrast", 127 );
122 brightness-> setTickInterval ( QMAX( 16, 256 / m_bres )); 122 brightness-> setTickInterval ( QMAX( 16, 256 / m_bres ));
123 brightness-> setLineStep ( QMAX( 1, 256 / m_bres )); 123 brightness-> setLineStep ( QMAX( 1, 256 / m_bres ));
124 brightness-> setPageStep ( QMAX( 1, 256 / m_bres )); 124 brightness-> setPageStep ( QMAX( 1, 256 / m_bres ));
125 brightness-> setValue ( bright ); 125 brightness-> setValue ( bright );
126 126
127//
127 if (m_cres) { 128 if (m_cres) {
128 contrast-> setTickInterval ( QMAX( 16, 256 / m_cres )); 129 contrast-> setTickInterval ( QMAX( 16, 256 / m_cres ));
129 contrast-> setLineStep ( QMAX( 1, 256 / m_cres )); 130 contrast-> setLineStep ( QMAX( 1, 256 / m_cres ));
130 contrast-> setPageStep ( QMAX( 1, 256 / m_cres )); 131 contrast-> setPageStep ( QMAX( 1, 256 / m_cres ));
131 contrast-> setValue ( contr ); 132 contrast-> setValue ( contr );
132 } 133 }
@@ -177,15 +178,17 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags )
177 178
178 m_resettimer = new QTimer ( this ); 179 m_resettimer = new QTimer ( this );
179 connect ( m_resettimer, SIGNAL( timeout()), this, SLOT( resetBacklight())); 180 connect ( m_resettimer, SIGNAL( timeout()), this, SLOT( resetBacklight()));
180 181
181 if ( PowerStatusManager::readStatus ( ). acStatus ( ) != PowerStatus::Online ) { 182 if ( PowerStatusManager::readStatus ( ). acStatus ( ) != PowerStatus::Online ) {
182 tabs-> setCurrentPage ( 0 ); 183 tabs-> setCurrentPage ( 0 );
184 brightness->setFocus();
183 } 185 }
184 else { 186 else {
185 tabs-> setCurrentPage ( 1 ); 187 tabs-> setCurrentPage ( 1 );
188 brightness_ac->setFocus();
186 } 189 }
187 190
188 connect ( brightness, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int))); 191 connect ( brightness, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int)));
189 connect ( brightness_ac, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int))); 192 connect ( brightness_ac, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int)));
190 if (m_cres) { 193 if (m_cres) {
191 connect ( contrast, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int))); 194 connect ( contrast, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int)));
diff --git a/core/settings/light-and-power/lightsettingsbase.ui b/core/settings/light-and-power/lightsettingsbase.ui
index 2af0331..1f1ff17 100644
--- a/core/settings/light-and-power/lightsettingsbase.ui
+++ b/core/settings/light-and-power/lightsettingsbase.ui
@@ -8,13 +8,13 @@
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>331</width> 14 <width>327</width>
15 <height>532</height> 15 <height>532</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>sizePolicy</name> 19 <name>sizePolicy</name>
20 <sizepolicy> 20 <sizepolicy>
@@ -1357,25 +1357,36 @@
1357 </connection> 1357 </connection>
1358 <slot access="public">calibrateSensor()</slot> 1358 <slot access="public">calibrateSensor()</slot>
1359 <slot access="public">calibrateSensorAC()</slot> 1359 <slot access="public">calibrateSensorAC()</slot>
1360</connections> 1360</connections>
1361<tabstops> 1361<tabstops>
1362 <tabstop>brightness</tabstop> 1362 <tabstop>brightness</tabstop>
1363 <tabstop>brightness_ac</tabstop>
1364 <tabstop>tabs</tabstop>
1365 <tabstop>LcdOffOnly</tabstop>
1366 <tabstop>closeHingeAction</tabstop>
1363 <tabstop>interval_dim</tabstop> 1367 <tabstop>interval_dim</tabstop>
1364 <tabstop>interval_lightoff</tabstop> 1368 <tabstop>interval_lightoff</tabstop>
1365 <tabstop>interval_suspend</tabstop> 1369 <tabstop>interval_suspend</tabstop>
1366 <tabstop>LcdOffOnly</tabstop>
1367 <tabstop>auto_brightness</tabstop> 1370 <tabstop>auto_brightness</tabstop>
1368 <tabstop>CalibrateLightSensor</tabstop> 1371 <tabstop>CalibrateLightSensor</tabstop>
1369 <tabstop>brightness</tabstop> 1372 <tabstop>brightness</tabstop>
1370 <tabstop>tabs</tabstop>
1371 <tabstop>interval_lightoff</tabstop> 1373 <tabstop>interval_lightoff</tabstop>
1372 <tabstop>interval_suspend</tabstop> 1374 <tabstop>interval_suspend</tabstop>
1373 <tabstop>interval_dim</tabstop> 1375 <tabstop>interval_dim</tabstop>
1374 <tabstop>LcdOffOnly_ac</tabstop> 1376 <tabstop>LcdOffOnly_ac</tabstop>
1375 <tabstop>auto_brightness</tabstop> 1377 <tabstop>auto_brightness</tabstop>
1376 <tabstop>CalibrateLightSensor_ac</tabstop> 1378 <tabstop>CalibrateLightSensor_ac</tabstop>
1377 <tabstop>lowSpinBox</tabstop> 1379 <tabstop>lowSpinBox</tabstop>
1378 <tabstop>warnintervalBox</tabstop> 1380 <tabstop>warnintervalBox</tabstop>
1379 <tabstop>criticalSpinBox</tabstop> 1381 <tabstop>criticalSpinBox</tabstop>
1382 <tabstop>frequency</tabstop>
1383 <tabstop>contrast</tabstop>
1384 <tabstop>interval_lightoff_ac</tabstop>
1385 <tabstop>interval_suspend_ac</tabstop>
1386 <tabstop>interval_dim_ac</tabstop>
1387 <tabstop>frequency_ac</tabstop>
1388 <tabstop>closeHingeAction_ac</tabstop>
1389 <tabstop>contrast_ac</tabstop>
1390 <tabstop>auto_brightness_ac</tabstop>
1380</tabstops> 1391</tabstops>
1381</UI> 1392</UI>