diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-01 01:04:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-01 01:04:24 +0300 |
commit | 51126f28cb4b258ba9711fa294652ed87f2451b8 (patch) | |
tree | 33fe16e876074f72c5f46a31f9735c3cf83fd70b /src/gui/setup.cpp | |
parent | 3a54cf61c4ea127a16ca11c515906a5f419b97df (diff) | |
download | manaplus-51126f28cb4b258ba9711fa294652ed87f2451b8.tar.gz manaplus-51126f28cb4b258ba9711fa294652ed87f2451b8.tar.bz2 manaplus-51126f28cb4b258ba9711fa294652ed87f2451b8.tar.xz manaplus-51126f28cb4b258ba9711fa294652ed87f2451b8.zip |
Fix some resize issues in setup window.
Diffstat (limited to 'src/gui/setup.cpp')
-rw-r--r-- | src/gui/setup.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index 659571d67..8961c2d56 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -55,7 +55,8 @@ Setup::Setup(): Window(_("Setup"), false, nullptr, "setup.xml"), gcn::ActionListener(), mResetWindows(nullptr), - mPanel(new TabbedArea(this)) + mPanel(new TabbedArea(this)), + mVersion(new Label(this, FULL_VERSION)) { setCloseButton(true); setResizable(true); @@ -68,7 +69,8 @@ Setup::Setup(): width += 100; setContentSize(width, height); - //setMaxHeight(height); + setMinWidth(310); + setMinHeight(210); static const char *buttonNames[] = { @@ -118,18 +120,16 @@ Setup::Setup(): add(mPanel); - Label *const version = new Label(this, FULL_VERSION); -// version->setPosition(9, height - version->getHeight() - 9); if (mResetWindows) { - version->setPosition(9, - height - version->getHeight() - mResetWindows->getHeight() - 9); + mVersion->setPosition(9, + height - mVersion->getHeight() - mResetWindows->getHeight() - 9); } else { - version->setPosition(9, height - version->getHeight() - 30); + mVersion->setPosition(9, height - mVersion->getHeight() - 30); } - add(version); + add(mVersion); center(); @@ -231,6 +231,15 @@ void Setup::widgetResized(const gcn::Event &event) x -= btn->getWidth() + buttonPadding; btn->setPosition(x, height - btn->getHeight() - buttonPadding); } + if (mResetWindows) + { + mVersion->setPosition(9, + height - mVersion->getHeight() - mResetWindows->getHeight() - 9); + } + else + { + mVersion->setPosition(9, height - mVersion->getHeight() - 30); + } } Setup *setupWindow; |