summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-30 13:20:20 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-30 13:20:20 +0300
commitdb4d45f08d4cd68ac46ad70930efcb25938faf82 (patch)
tree1ff984c61184720299f74fef963ddb7eafae2e2a
parentc7c6894dcede6778f311171f1128024b5ba97d84 (diff)
downloadmanaverse-db4d45f08d4cd68ac46ad70930efcb25938faf82.tar.gz
manaverse-db4d45f08d4cd68ac46ad70930efcb25938faf82.tar.bz2
manaverse-db4d45f08d4cd68ac46ad70930efcb25938faf82.tar.xz
manaverse-db4d45f08d4cd68ac46ad70930efcb25938faf82.zip
Set correct size in theme settings tab with different resolutions and font sizes.
-rw-r--r--src/gui/setup_theme.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/setup_theme.cpp b/src/gui/setup_theme.cpp
index d0a3a2c54..200b86219 100644
--- a/src/gui/setup_theme.cpp
+++ b/src/gui/setup_theme.cpp
@@ -362,7 +362,14 @@ Setup_Theme::Setup_Theme(const Widget2 *const widget) :
place(17, 0, mInfoButton, 1);
- setDimension(gcn::Rectangle(0, 0, 365, 500));
+ int size = mainGraphics->mWidth - 10;
+ const int maxWidth = mFontSize * 30 + 290;
+ if (size < 465)
+ size = 465;
+ else if (size > maxWidth)
+ size = maxWidth;
+
+ setDimension(gcn::Rectangle(0, 0, size, 500));
}
Setup_Theme::~Setup_Theme()