┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-08-19 06:33:28 +0000
committerPeter Penz <[email protected]>2008-08-19 06:33:28 +0000
commit02ad08712f6643a8a24d9e7ba8a40225256ef758 (patch)
tree3bda0ece01af65daa1981021d5674c8589388950
parentc2d303aab47b4a9ca0404075aa4a2dda91f4c9f2 (diff)
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: [email protected] svn path=/trunk/KDE/kdebase/apps/; revision=849168
-rw-r--r--src/tooltipmanager.cpp15
1 files changed, 3 insertions, 12 deletions
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();