diff --git a/res/layouts/pages/settings_display.xml.lua b/res/layouts/pages/settings_display.xml.lua index e7f58f8ef..446d6b4b3 100644 --- a/res/layouts/pages/settings_display.xml.lua +++ b/res/layouts/pages/settings_display.xml.lua @@ -11,12 +11,8 @@ end tostring_overrides["display.gui-scale"] = function(x) if x == 0 then - return string.format("%s (%d)", gui.str("Auto"), gui.get_max_scale()) - end - local effective = gui.get_scale() - if effective ~= x then - -- menu is limited by window size - return string.format("%s (%s %s)", tostring(x), gui.str("Effective"), tostring(effective)) + -- the scale chosen automatically for the current window + return string.format("%s (%s)", gui.str("Auto"), tostring(gui.get_scale())) end return tostring(x) end diff --git a/res/texts/ru_RU.txt b/res/texts/ru_RU.txt index 68f654d98..bf5032042 100644 --- a/res/texts/ru_RU.txt +++ b/res/texts/ru_RU.txt @@ -13,7 +13,6 @@ Description=Описание Converting world...=Выполняется конвертация мира... Unlimited=Неограниченно Auto=Авто -Effective=действует Chat=Чат Console=Консоль Log=Лог diff --git a/src/graphics/ui/GUI.cpp b/src/graphics/ui/GUI.cpp index 871cc702f..d74c5bda6 100644 --- a/src/graphics/ui/GUI.cpp +++ b/src/graphics/ui/GUI.cpp @@ -110,9 +110,10 @@ float GUI::calcScale(const glm::uvec2& viewport) const { ? static_cast(calcMaxScale(viewport)) // auto : value; - // while a menu page is open, it must fit the window + // explicitly set scale is applied as is; in auto mode an open menu page + // must fit the window auto& page = menu->getCurrent(); - if (page.panel) { + if (value <= 0.0f && page.panel) { auto size = page.panel->getSize(); if (size.x > 0.0f && size.y > 0.0f) { float fit = std::min(viewport.x / size.x, viewport.y / size.y);