Apply explicit GUI scale as is

Explicitly chosen scale is no longer reduced to fit the open menu page
(2 stayed 1.5 in settings). Fitting to the window remains in auto mode.
This commit is contained in:
loki5512344 2026-10-03 13:31:38 +00:00
parent 48d5d54b77
commit 11b44b78f7
3 changed files with 5 additions and 9 deletions

View file

@ -110,9 +110,10 @@ float GUI::calcScale(const glm::uvec2& viewport) const {
? static_cast<float>(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);