diff --git a/apps/openmw/mwgui/birth.cpp b/apps/openmw/mwgui/birth.cpp index f5fc164ee2..3dab0a7772 100644 --- a/apps/openmw/mwgui/birth.cpp +++ b/apps/openmw/mwgui/birth.cpp @@ -184,8 +184,8 @@ namespace MWGui return; Widgets::MWSpellPtr spellWidget; - const int lineHeight = 18; - MyGUI::IntCoord coord(0, 0, mSpellArea->getWidth(), 18); + const int lineHeight = MWBase::Environment::get().getWindowManager()->getFontHeight() + 2; + MyGUI::IntCoord coord(0, 0, mSpellArea->getWidth(), lineHeight); const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); diff --git a/apps/openmw/mwgui/itemwidget.cpp b/apps/openmw/mwgui/itemwidget.cpp index 1ae683f3b4..3f0ac39693 100644 --- a/apps/openmw/mwgui/itemwidget.cpp +++ b/apps/openmw/mwgui/itemwidget.cpp @@ -20,6 +20,8 @@ namespace { std::string getCountString(int count) { + static const int fontHeight = MWBase::Environment::get().getWindowManager()->getFontHeight(); + if (count == 1) return ""; @@ -29,6 +31,8 @@ namespace return MyGUI::utility::toString(count/1000000) + "m"; else if (count > 9999) return MyGUI::utility::toString(count/1000) + "k"; + else if (fontHeight >= 18 && count > 999) + return MyGUI::utility::toString(count/1000) + "k"; else return MyGUI::utility::toString(count); } diff --git a/apps/openmw/mwgui/race.cpp b/apps/openmw/mwgui/race.cpp index 6427499283..e1bacf4619 100644 --- a/apps/openmw/mwgui/race.cpp +++ b/apps/openmw/mwgui/race.cpp @@ -400,7 +400,7 @@ namespace MWGui return; Widgets::MWSkillPtr skillWidget; - const int lineHeight = 18; + const int lineHeight = MWBase::Environment::get().getWindowManager()->getFontHeight() + 2; MyGUI::IntCoord coord1(0, 0, mSkillList->getWidth(), 18); const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); @@ -436,8 +436,8 @@ namespace MWGui if (mCurrentRaceId.empty()) return; - const int lineHeight = 18; - MyGUI::IntCoord coord(0, 0, mSpellPowerList->getWidth(), 18); + const int lineHeight = MWBase::Environment::get().getWindowManager()->getFontHeight() + 2; + MyGUI::IntCoord coord(0, 0, mSpellPowerList->getWidth(), lineHeight); const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const ESM::Race *race = store.get().find(mCurrentRaceId); diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index d2429dfcf0..a843991ea6 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -812,7 +812,7 @@ namespace MWGui void SettingsWindow::layoutControlsBox() { - const int h = 18; + const int h = MWBase::Environment::get().getWindowManager()->getFontHeight() + 2; const int w = mControlsBox->getWidth() - 28; const int noWidgetsInRow = 2; const int totalH = mControlsBox->getChildCount() / noWidgetsInRow * h; diff --git a/apps/openmw/mwgui/spellview.cpp b/apps/openmw/mwgui/spellview.cpp index a8b7cb6398..fe081e0b16 100644 --- a/apps/openmw/mwgui/spellview.cpp +++ b/apps/openmw/mwgui/spellview.cpp @@ -5,6 +5,9 @@ #include #include +#include "../mwbase/environment.hpp" +#include "../mwbase/windowmanager.hpp" + #include #include @@ -84,7 +87,7 @@ namespace MWGui int curType = -1; - const int spellHeight = 18; + const int spellHeight = MWBase::Environment::get().getWindowManager()->getFontHeight() + 2; mLines.clear(); diff --git a/files/data/mygui/openmw_settings_window.layout b/files/data/mygui/openmw_settings_window.layout index 79afa0687b..d698844d2e 100644 --- a/files/data/mygui/openmw_settings_window.layout +++ b/files/data/mygui/openmw_settings_window.layout @@ -275,18 +275,18 @@ - - + + - + - + @@ -296,7 +296,7 @@ - + @@ -306,7 +306,7 @@ - + @@ -320,7 +320,7 @@ - +