summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-23 15:11:03 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-23 15:11:03 +0300
commitbc4c9a33066e26bcdd3c564c90294777a839a5be (patch)
tree2ae1d07a962733394ac24eb5329407b6d81477ff
parent88df3eb6e82e1a23f379416652ac4f12f22a063c (diff)
downloadplus-bc4c9a33066e26bcdd3c564c90294777a839a5be.tar.gz
plus-bc4c9a33066e26bcdd3c564c90294777a839a5be.tar.bz2
plus-bc4c9a33066e26bcdd3c564c90294777a839a5be.tar.xz
plus-bc4c9a33066e26bcdd3c564c90294777a839a5be.zip
Fix unused empty space in onscreen buttons.
-rw-r--r--src/gui/windowmenu.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index f33fe3e87..e0bd1c843 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -239,10 +239,15 @@ void WindowMenu::addButton(const char *const text,
add(btn);
btn->setFocusable(false);
if (!visible)
+ {
btn->setVisible(false);
+ }
+ else
+ {
+ x += btn->getWidth() + 3;
+ h = btn->getHeight();
+ }
mButtons.push_back(btn);
- x += btn->getWidth() + 3;
- h = btn->getHeight();
mButtonNames[text] = btn;
}