From: Peter Penz Date: Tue, 19 Aug 2008 06:33:28 +0000 (+0000) Subject: Removed fix for negative x-coordinate again and added a TODO. We must provide a solut... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/02ad08712f6643a8a24d9e7ba8a40225256ef758 Removed fix for negative x-coordinate again and added a TODO. We must provide a solution that works for x and y, as Dolphin in KDE 4.2 offers very large item sizes. CCMAIL: kdedevel@etotheipiplusone.com svn path=/trunk/KDE/kdebase/apps/; revision=849168 --- diff --git a/src/tooltipmanager.cpp b/src/tooltipmanager.cpp index 2b41ac48f..71c29e51b 100644 --- a/src/tooltipmanager.cpp +++ b/src/tooltipmanager.cpp @@ -129,19 +129,10 @@ void ToolTipManager::showToolTip() // - the content is not drawn inside m_itemRect int x = m_itemRect.right(); int y = m_itemRect.bottom(); + // TODO: handle usecase if x or y get smaller than the + // desktop-left or the desktop-top if (x + size.width() - 1 > desktop.right()) { - // Any room to the left of the item? - if (m_itemRect.left() - size.width() > desktop.left()) - { - x = m_itemRect.left() - size.width(); - } - else - { - // Move left until we are back onscreen; we'll be horizontally - // overlapping m_itemRect, but hopefully the y value will keep us - // from drawing inside it. - x = desktop.right() - size.width(); - } + x = m_itemRect.left() - size.width(); } if (y + size.height() - 1 > desktop.bottom()) { y = m_itemRect.top() - size.height();