From db4d45f08d4cd68ac46ad70930efcb25938faf82 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 30 Jun 2013 13:20:20 +0300 Subject: Set correct size in theme settings tab with different resolutions and font sizes. --- src/gui/setup_theme.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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() -- cgit v1.2.3-70-g09d2