mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-01 01:09:41 +00:00
Improve handling of larger font size
This commit is contained in:
parent
c3d3f3140b
commit
2cd2b42e33
6 changed files with 21 additions and 14 deletions
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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<ESM::Race>().find(mCurrentRaceId);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
#include <MyGUI_ImageBox.h>
|
||||
#include <MyGUI_Gui.h>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
|
||||
#include <components/widgets/sharedstatebutton.hpp>
|
||||
#include <components/widgets/box.hpp>
|
||||
|
||||
|
@ -84,7 +87,7 @@ namespace MWGui
|
|||
|
||||
int curType = -1;
|
||||
|
||||
const int spellHeight = 18;
|
||||
const int spellHeight = MWBase::Environment::get().getWindowManager()->getFontHeight() + 2;
|
||||
|
||||
mLines.clear();
|
||||
|
||||
|
|
|
@ -275,18 +275,18 @@
|
|||
<Property key="ButtonAutoWidth" value="true"/>
|
||||
<Widget type="TabItem">
|
||||
<Property key="Caption" value=" #{sVideo} "/>
|
||||
<Widget type="ListBox" skin="MW_List" position="0 4 170 215" align="Left Top" name="ResolutionList"/>
|
||||
<Widget type="TextBox" skin="NormalText" position="182 4 170 18" align="Left Top">
|
||||
<Widget type="ListBox" skin="MW_List" position="0 4 185 215" align="Left Top" name="ResolutionList"/>
|
||||
<Widget type="TextBox" skin="NormalText" position="197 4 185 18" align="Left Top">
|
||||
<Property key="Caption" value="#{SettingsMenu:WindowMode}"/>
|
||||
</Widget>
|
||||
<Widget type="HBox" position="182 28 400 24">
|
||||
<Widget type="HBox" position="197 28 400 24">
|
||||
<Widget type="ComboBox" skin="MW_ComboBox" position="0 0 200 24" align="Left Top" name="WindowModeList">
|
||||
<Property key="AddItem" value="#{SettingsMenu:WindowModeFullscreen}"/>
|
||||
<Property key="AddItem" value="#{SettingsMenu:WindowModeWindowedFullscreen}"/>
|
||||
<Property key="AddItem" value="#{SettingsMenu:WindowModeWindowed}"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
<Widget type="HBox" position="182 64 400 24">
|
||||
<Widget type="HBox" position="197 64 400 24">
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="VSyncButton">
|
||||
<UserString key="SettingCategory" value="Video"/>
|
||||
<UserString key="SettingName" value="vsync"/>
|
||||
|
@ -296,7 +296,7 @@
|
|||
<Property key="Caption" value="#{SettingsMenu:VSync}"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
<Widget type="HBox" position="182 94 300 24">
|
||||
<Widget type="HBox" position="197 94 300 24">
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="WindowBorderButton">
|
||||
<UserString key="SettingCategory" value="Video"/>
|
||||
<UserString key="SettingName" value="window border"/>
|
||||
|
@ -306,7 +306,7 @@
|
|||
<Property key="Caption" value="#{SettingsMenu:WindowBorder}"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
<Widget type="HBox" position="182 124 300 24">
|
||||
<Widget type="HBox" position="197 124 300 24">
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="WindowBorderButton">
|
||||
<UserString key="SettingCategory" value="Post Processing"/>
|
||||
<UserString key="SettingName" value="enabled"/>
|
||||
|
@ -320,7 +320,7 @@
|
|||
</Widget>
|
||||
</Widget>
|
||||
|
||||
<Widget type="AutoSizedTextBox" skin="SandText" position="182 154 300 32" align="Left Top">
|
||||
<Widget type="AutoSizedTextBox" skin="SandText" position="197 154 300 32" align="Left Top">
|
||||
<Property key="Caption" value="#{SettingsMenu:FrameRateHint}"/>
|
||||
</Widget>
|
||||
|
||||
|
|
Loading…
Reference in a new issue