summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-27 15:54:25 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-28 09:34:21 +0100
commit474442f1a49d29d85de769c4fbb3aa8636877b49 (patch)
tree2d8218d3648f370d31009831c86fc4c6b9f30033 /src/gui/popupmenu.cpp
parentdac3832265fa17de8d3b9d3ea8d930b83efe9c17 (diff)
downloadmana-474442f1a49d29d85de769c4fbb3aa8636877b49.tar.gz
mana-474442f1a49d29d85de769c4fbb3aa8636877b49.tar.bz2
mana-474442f1a49d29d85de769c4fbb3aa8636877b49.tar.xz
mana-474442f1a49d29d85de769c4fbb3aa8636877b49.zip
Fixed size and child positions for various popups
Most prominently, fixes the tooltips on the window buttons being clipped due to their position being slightly outside of the clipping children area. And fixes NPC tooltips from having a lot of empty space below the NPC name. Also reduced the space between texts in the item tooltip to match the padding rather than being an entire empty line.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index dec3faf9..3c91a273 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -58,7 +58,6 @@ PopupMenu::PopupMenu():
Popup("PopupMenu")
{
mBrowserBox = new BrowserBox;
- mBrowserBox->setPosition(4, 4);
mBrowserBox->setHighlightMode(BrowserBox::BACKGROUND);
mBrowserBox->setLinkHandler(this);
add(mBrowserBox);
@@ -399,7 +398,7 @@ void PopupMenu::showPopup(Window *parent, int x, int y, Item *item,
void PopupMenu::showPopup(int x, int y)
{
- setContentSize(mBrowserBox->getWidth() + 8, mBrowserBox->getHeight() + 8);
+ setContentSize(mBrowserBox->getWidth(), mBrowserBox->getHeight());
if (graphics->getWidth() < (x + getWidth() + 5))
x = graphics->getWidth() - getWidth();
if (graphics->getHeight() < (y + getHeight() + 5))