diff options
author | sapier <Sapier at GMX dot net> | 2015-01-02 16:52:02 +0100 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2015-01-02 16:52:02 +0100 |
commit | aaec558f854c3eacb7bd8b0fe7e14d2ee35ab5ed (patch) | |
tree | 6427a17f86aca5905814ebdd6e255368a26c3906 /src | |
parent | 7452d5399b9c7516abfc9f97bf5db70aff2ce0fa (diff) | |
download | minetest-aaec558f854c3eacb7bd8b0fe7e14d2ee35ab5ed.tar.gz minetest-aaec558f854c3eacb7bd8b0fe7e14d2ee35ab5ed.tar.bz2 minetest-aaec558f854c3eacb7bd8b0fe7e14d2ee35ab5ed.zip |
Fix rounding error in font size making main menu and in game font sizes inconsistent
Diffstat (limited to 'src')
-rw-r--r-- | src/guiFormSpecMenu.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index 6ef20cead..35a0380ba 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -1951,7 +1951,7 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize) // wide, including border) just fit into the // default window (800 pixels wide) at 96 DPI // and default scaling (1.00). - use_imgsize = 0.53 * screen_dpi * gui_scaling; + use_imgsize = 0.5555 * screen_dpi * gui_scaling; } else { // In variable-size mode, we prefer to make the // inventory image size 1/15 of screen height, @@ -1991,6 +1991,7 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize) spacing = v2s32(use_imgsize*5.0/4, use_imgsize*15.0/13); padding = v2s32(use_imgsize*3.0/8, use_imgsize*3.0/8); double target_font_height = use_imgsize*15.0/13 * 0.4; + target_font_height *= g_settings->getFloat("font_size")/TTF_DEFAULT_FONT_SIZE; m_btn_height = use_imgsize*15.0/13 * 0.35; m_font = select_font_by_line_height(target_font_height); |