kdebase/libkonq

George Staikos staikos at kde.org
Sun Feb 23 00:24:17 GMT 2003


CVS commit by staikos: 

http://developer.kde.org/documentation/other/developer-faq.html#q71

Developers: please read this.  Do -not- use [QK]Application::desktop() in
your code.

CCMAIL: kde-core-devel at mail.kde.org, kde-devel at mail.kde.org


  M +3 -4      konq_iconviewwidget.cc   1.226


--- kdebase/libkonq/konq_iconviewwidget.cc  #1.225:1.226
@@ -175,6 +175,6 @@ void KFileTip::reposition()
     m_corner = 0;
     // should the tooltip be shown to the left or to the right of the ivi ?
-    if ( /*( ( rect.center().x() > width() ) && ( rect.center().x() - off.x() > m_view->width() / 2 ) ) || */
-        ( rect.center().x() + width() > QApplication::desktop()->width() ) )
+    QRect desk = KGlobalSettings::desktopGeometry(rect.center());
+    if (rect.center().x() + width() > desk.right())
     {
         // to the left
@@ -183,6 +183,5 @@ void KFileTip::reposition()
     }
     // should the tooltip be shown above or below the ivi ?
-    if ( /*( ( rect.top() > height() ) && ( rect.top() - off.y() > m_view->height() / 2 ) ) || */
-        ( rect.bottom() + height() > QApplication::desktop()->height() ) )
+    if (rect.bottom() + height() > desk.bottom())
     {
         // above






More information about the kde-core-devel mailing list