sculpt: use screen's min(w,h) to calc font size

By not merely using the screen height, the calculation produces a
reasonable default when rotating the screen by 90 degrees.
This commit is contained in:
Norman Feske 2025-04-17 11:45:57 +02:00
parent aca8c48323
commit 8b3633a0d2

View File

@ -2270,7 +2270,7 @@ void Sculpt::Main::_handle_gui_mode()
double const orig_font_size_px = _font_size_px;
_font_size_px = (double)_screen_size.h / 60.0;
_font_size_px = (double)min(_screen_size.w, _screen_size.h) / 60.0;
if (_settings.font_size == Settings::Font_size::SMALL) _font_size_px *= 0.85;
if (_settings.font_size == Settings::Font_size::LARGE) _font_size_px *= 1.35;