summaryrefslogtreecommitdiff
authordeller <deller>2005-04-01 22:46:30 (UTC)
committer deller <deller>2005-04-01 22:46:30 (UTC)
commit88cc0cc17864de6e36bdeedaae6df0a5cc738c5a (patch) (unidiff)
treeae0b24a579e940e6d508821dd98ee0edf2c95c03
parentcc4594a5c8d45d2f8d14c6ac1723a8ed39577f8f (diff)
downloadopie-88cc0cc17864de6e36bdeedaae6df0a5cc738c5a.zip
opie-88cc0cc17864de6e36bdeedaae6df0a5cc738c5a.tar.gz
opie-88cc0cc17864de6e36bdeedaae6df0a5cc738c5a.tar.bz2
show the popups inside the visible screen
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.cpp2
-rw-r--r--noncore/applets/wirelessapplet/wireless.cpp2
2 files changed, 2 insertions, 2 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
@@ -510,17 +510,17 @@ void VolumeControl::show ( bool /*showMic*/ )
510 QPoint curPos = m_icon-> mapToGlobal ( QPoint ( 0, 0 )); 510 QPoint curPos = m_icon-> mapToGlobal ( QPoint ( 0, 0 ));
511 511
512 int w = sizeHint ( ). width ( ); 512 int w = sizeHint ( ). width ( );
513 int x = curPos.x ( ) - ( w / 2 ); 513 int x = curPos.x ( ) - ( w / 2 );
514 514
515 if (( x + w ) > QPEApplication::desktop ( )-> width ( )) 515 if (( x + w ) > QPEApplication::desktop ( )-> width ( ))
516 x = QPEApplication::desktop ( )-> width ( ) - w; 516 x = QPEApplication::desktop ( )-> width ( ) - w;
517 517
518 move ( x, curPos. y ( ) - sizeHint ( ). height ( )); 518 move ( QMAX(x,0), curPos. y ( ) - sizeHint ( ). height ( ));
519 QFrame::show ( ); 519 QFrame::show ( );
520 520
521} 521}
522 522
523void VolumeControl::readConfig ( bool force ) 523void VolumeControl::readConfig ( bool force )
524{ 524{
525 Config cfg ( "qpe" ); 525 Config cfg ( "qpe" );
526 cfg. setGroup ( "Volume" ); 526 cfg. setGroup ( "Volume" );
diff --git a/noncore/applets/wirelessapplet/wireless.cpp b/noncore/applets/wirelessapplet/wireless.cpp
index 364f3ad..88ab032 100644
--- a/noncore/applets/wirelessapplet/wireless.cpp
+++ b/noncore/applets/wirelessapplet/wireless.cpp
@@ -154,17 +154,17 @@ void WirelessControl::show ( bool )
154 QPoint curPos = applet->mapToGlobal( QPoint ( 0, 0 ) ); 154 QPoint curPos = applet->mapToGlobal( QPoint ( 0, 0 ) );
155 155
156 int w = sizeHint().width(); 156 int w = sizeHint().width();
157 int x = curPos.x() - ( w / 2 ); 157 int x = curPos.x() - ( w / 2 );
158 158
159 if ( ( x + w ) > QPEApplication::desktop() ->width() ) 159 if ( ( x + w ) > QPEApplication::desktop() ->width() )
160 x = QPEApplication::desktop ( ) -> width ( ) - w; 160 x = QPEApplication::desktop ( ) -> width ( ) - w;
161 161
162 move( x, curPos.y () - sizeHint().height () ); 162 move( QMAX(x,0), curPos.y () - sizeHint().height () );
163 QFrame::show(); 163 QFrame::show();
164} 164}
165 165
166void WirelessControl::readConfig() 166void WirelessControl::readConfig()
167{ 167{
168 Config cfg( "qpe" ); 168 Config cfg( "qpe" );
169 cfg.setGroup( "Wireless" ); 169 cfg.setGroup( "Wireless" );
170 170