summaryrefslogtreecommitdiff
path: root/core/applets
authordeller <deller>2005-04-01 22:46:30 (UTC)
committer deller <deller>2005-04-01 22:46:30 (UTC)
commit88cc0cc17864de6e36bdeedaae6df0a5cc738c5a (patch) (side-by-side diff)
treeae0b24a579e940e6d508821dd98ee0edf2c95c03 /core/applets
parentcc4594a5c8d45d2f8d14c6ac1723a8ed39577f8f (diff)
downloadopie-88cc0cc17864de6e36bdeedaae6df0a5cc738c5a.zip
opie-88cc0cc17864de6e36bdeedaae6df0a5cc738c5a.tar.gz
opie-88cc0cc17864de6e36bdeedaae6df0a5cc738c5a.tar.bz2
show the popups inside the visible screen
Diffstat (limited to 'core/applets') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp
index 11ba2f6..7f0aca5 100644
--- a/core/applets/volumeapplet/volume.cpp
+++ b/core/applets/volumeapplet/volume.cpp
@@ -494,49 +494,49 @@ void VolumeControl::buttonChanged ( )
else
rateTimer-> stop ( );
}
void VolumeControl::rateTimerDone ( )
{
if ( upButton-> isDown ( ))
volSlider-> setValue ( volSlider-> value ( ) - 2 );
else // if ( downButton-> isDown ( ))
volSlider-> setValue ( volSlider-> value ( ) + 2 );
}
void VolumeControl::show ( bool /*showMic*/ )
{
readConfig ( );
QPoint curPos = m_icon-> mapToGlobal ( QPoint ( 0, 0 ));
int w = sizeHint ( ). width ( );
int x = curPos.x ( ) - ( w / 2 );
if (( x + w ) > QPEApplication::desktop ( )-> width ( ))
x = QPEApplication::desktop ( )-> width ( ) - w;
- move ( x, curPos. y ( ) - sizeHint ( ). height ( ));
+ move ( QMAX(x,0), curPos. y ( ) - sizeHint ( ). height ( ));
QFrame::show ( );
}
void VolumeControl::readConfig ( bool force )
{
Config cfg ( "qpe" );
cfg. setGroup ( "Volume" );
int old_vp = m_vol_percent;
int old_mp = m_mic_percent;
int old_bass = m_bass_percent;
int old_treble = m_treble_percent;
bool old_vm = m_vol_muted;
bool old_mm = m_mic_muted;
bool old_sk = m_snd_key;
bool old_st = m_snd_touch;
bool old_sa = m_snd_alarm;
int old_ap = m_alarm_percent;
m_vol_percent = cfg. readNumEntry ( "VolumePercent", 50 );
m_mic_percent = cfg. readNumEntry ( "Mic", 50 );
m_bass_percent = cfg. readNumEntry ( "BassPercent", 50 );
m_treble_percent = cfg. readNumEntry ( "TreblePercent", 50 );