From 5b9a9f4d9e005536550b5a6380a2a95d00f35b56 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 6 Mar 2025 16:35:28 +0100 Subject: [PATCH] sculpt: update panel width on screen-size change As the panel dialog's min width is propagated via the menu-view config, we need to re-generate the runtime config whenever the leitzentrale's size changes. Otherwise the update merely happens as a side effect of dynamically adjusting the font size, which does not happen with the fixed config/fonts file. Issue #5370 --- repos/gems/src/app/sculpt_manager/main.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index ead51c19e7..c7133a4989 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -2158,6 +2158,8 @@ void Sculpt::Main::_handle_gui_mode() bool const screen_changed = (orig_screen_rect != Rect { _screen_pos, _screen_size }) || (orig_hovered_display != _hovered_display); + bool update_runtime_config = false; + if (screen_changed) { _gui_fb_config.generate([&] (Xml_generator &xml) { xml.attribute("xpos", _screen_pos.x); @@ -2175,6 +2177,7 @@ void Sculpt::Main::_handle_gui_mode() _network_dialog.refresh(); _diag_dialog.refresh(); _update_window_layout(); + update_runtime_config = true; } _settings.manual_fonts_config = _fonts_config.try_generate_manually_managed(); @@ -2238,9 +2241,12 @@ void Sculpt::Main::_handle_gui_mode() gen_color(8, background); }); /* propagate fonts config of runtime view */ - generate_runtime_config(); + update_runtime_config = true; } } + + if (update_runtime_config) + generate_runtime_config(); }