From c4e81adb83d9c33edbbedef8a103fd35def01ef6 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 16 Oct 2014 15:07:26 +0200 Subject: [PATCH] Fix settings window being too small for all tabs on some localizations --- apps/openmw/mwgui/settingswindow.cpp | 7 + apps/openmw/mwgui/settingswindow.hpp | 2 + files/mygui/openmw_settings_window.layout | 268 +++++++++------------- 3 files changed, 115 insertions(+), 162 deletions(-) diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index 74def66e3..948423a35 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -179,6 +179,8 @@ namespace MWGui getWidget(mRefractionButton, "RefractionButton"); getWidget(mDifficultySlider, "DifficultySlider"); + mMainWidget->castType()->eventWindowChangeCoord += MyGUI::newDelegate(this, &SettingsWindow::onWindowResize); + mOkButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SettingsWindow::onOkButtonClicked); mShaderModeButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SettingsWindow::onShaderModeToggled); mTextureFilteringButton->eventComboChangePosition += MyGUI::newDelegate(this, &SettingsWindow::onTextureFilteringChanged); @@ -515,4 +517,9 @@ namespace MWGui { MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Settings); } + + void SettingsWindow::onWindowResize(MyGUI::Window *_sender) + { + updateControlsBox(); + } } diff --git a/apps/openmw/mwgui/settingswindow.hpp b/apps/openmw/mwgui/settingswindow.hpp index cbfb5cfe1..2619943f9 100644 --- a/apps/openmw/mwgui/settingswindow.hpp +++ b/apps/openmw/mwgui/settingswindow.hpp @@ -63,6 +63,8 @@ namespace MWGui void onResetDefaultBindings(MyGUI::Widget* _sender); void onResetDefaultBindingsAccept (); + void onWindowResize(MyGUI::Window* _sender); + void apply(); void configureWidgets(MyGUI::Widget* widget); diff --git a/files/mygui/openmw_settings_window.layout b/files/mygui/openmw_settings_window.layout index fa6485688..fd84be3e9 100644 --- a/files/mygui/openmw_settings_window.layout +++ b/files/mygui/openmw_settings_window.layout @@ -1,22 +1,16 @@ - - - - - - - - - + + + + + - - + - - + - + @@ -28,17 +22,16 @@ - + - - + - + @@ -50,17 +43,16 @@ - + - - + - + @@ -74,64 +66,58 @@ - + - - + - + - - + - + - - + - + - - + - + - - + - - + @@ -139,11 +125,10 @@ - - + @@ -151,11 +136,10 @@ - - + @@ -163,11 +147,10 @@ - - + @@ -175,11 +158,10 @@ - - + @@ -188,32 +170,30 @@ - + - - - + + + + - - + - - - + + - + - - + - + @@ -223,78 +203,68 @@ - + - + - - + - - + - - + - - - - + + - + - - - + + - + - - - - + + + - - - + + - + - - - - + + + - - + @@ -308,15 +278,13 @@ - + - - + - @@ -325,7 +293,6 @@ - @@ -337,7 +304,6 @@ - @@ -360,166 +326,144 @@ - - + - - - - + + - + - - - - + + - - + + - - - + + - + - - - + + - + - - - + + - + - - + - - - + + - + - - - - + + - + - - - + + - + - - - - + + - + - - - + + - + - - - + + - + - - - - + + + - + - - + - - - - + - +