diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-30 13:20:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-30 13:20:20 +0300 |
commit | db4d45f08d4cd68ac46ad70930efcb25938faf82 (patch) | |
tree | 1ff984c61184720299f74fef963ddb7eafae2e2a /src/gui/setup_theme.cpp | |
parent | c7c6894dcede6778f311171f1128024b5ba97d84 (diff) | |
download | ManaVerse-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.
Diffstat (limited to 'src/gui/setup_theme.cpp')
-rw-r--r-- | src/gui/setup_theme.cpp | 9 |
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() |