[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_1_BRANCH: kdemultimedia/noatun/modules/simple
From:       Stefan Gehn <sgehn () gmx ! net>
Date:       2003-11-09 20:23:56
[Download RAW message or body]

CVS commit by metz: 

Backport fix for bug #67561


  M +9 -1      userinterface.cpp   1.7.2.4


--- kdemultimedia/noatun/modules/simple/userinterface.cpp  #1.7.2.3:1.7.2.4
@@ -352,5 +352,13 @@ void SimpleUI::slotVolumeFrame()
         int y = -(volumeFrame->height() + 5);
 
-        volumeFrame->move( volumeButton->mapToGlobal( QPoint( x, y ) ) );
+        QPoint point( volumeButton->mapToGlobal( QPoint( x, y ) ) );
+        QDesktopWidget *tmp = QApplication::desktop();
+        QRect deskRect = tmp->screenGeometry(tmp->screenNumber(point));
+
+        bool bottom = (point.y() + volumeFrame->height()) > (deskRect.y() + \
deskRect.height()); +        bool right = (point.x() + volumeFrame->width()) > \
(deskRect.x() + deskRect.width()); +
+        volumeFrame->move(right ? (deskRect.x() + deskRect.width()) - \
volumeFrame->width() : ( point.x() < 0 ? 0 : point.x() ), +             bottom ? \
(deskRect.y() + deskRect.height()) - volumeFrame->height() : ( point.y() < 0 ? 0 : \
point.y() ) );  volumeFrame->show();
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic