summaryrefslogtreecommitdiff
path: root/src/gui/itempopup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itempopup.cpp')
-rw-r--r--src/gui/itempopup.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index 81e4607b..f9916a89 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -122,8 +122,8 @@ void ItemPopup::view(int x, int y)
{
if (windowContainer->getWidth() < (x + getWidth() + 5))
x = windowContainer->getWidth() - getWidth();
- if (windowContainer->getHeight() < (y + getHeight() + 5))
- y = windowContainer->getHeight() - getHeight();
+ if ((y - getHeight() - 5) < 0)
+ y = 0;
else
y = y - getHeight() - 5;
setPosition(x, y);