From 3958c19f839696d7789295fa5b364c2090744d72 Mon Sep 17 00:00:00 2001 From: grorp Date: Sun, 30 Jun 2024 20:39:36 +0200 Subject: [PATCH] Remove enable_touch special case for C++ menu scaling (#14800) --- src/gui/modalMenu.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gui/modalMenu.cpp b/src/gui/modalMenu.cpp index 00bc143bb..bd8358b62 100644 --- a/src/gui/modalMenu.cpp +++ b/src/gui/modalMenu.cpp @@ -59,14 +59,8 @@ GUIModalMenu::GUIModalMenu(gui::IGUIEnvironment* env, gui::IGUIElement* parent, m_menumgr(menumgr), m_remap_click_outside(remap_click_outside) { - m_gui_scale = std::max(g_settings->getFloat("gui_scaling"), 0.5f); - const float screen_dpi_scale = RenderingEngine::getDisplayDensity(); - - if (g_settings->getBool("enable_touch")) { - m_gui_scale *= 1.1f - 0.3f * screen_dpi_scale + 0.2f * screen_dpi_scale * screen_dpi_scale; - } else { - m_gui_scale *= screen_dpi_scale; - } + m_gui_scale = g_settings->getFloat("gui_scaling", 0.5f, 20.0f) * + RenderingEngine::getDisplayDensity(); setVisible(true); m_menumgr->createdMenu(this);