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
This commit is contained in:
Norman Feske 2025-03-06 16:35:28 +01:00
parent a6ae7c7c58
commit 5b9a9f4d9e

View File

@ -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();
}