TabSLAMaterial:: Fixed re-scaling and sys color change for "Overrides" page.

(SPE-2322)
This commit is contained in:
YuSanka 2024-05-23 14:50:19 +02:00 committed by Lukas Matena
parent 3543f8c738
commit c2eac9502f
2 changed files with 21 additions and 0 deletions

View File

@ -5379,6 +5379,25 @@ void TabSLAMaterial::update()
wxGetApp().mainframe->on_config_changed(m_config);
}
void TabSLAMaterial::msw_rescale()
{
for (const auto& over_opt : m_overrides_options)
if (wxWindow* win = over_opt.second)
win->SetInitialSize(win->GetBestSize());
Tab::msw_rescale();
}
void TabSLAMaterial::sys_color_changed()
{
Tab::sys_color_changed();
for (const auto& over_opt : m_overrides_options)
if (wxWindow* check_box = over_opt.second) {
wxGetApp().UpdateDarkUI(check_box);
CheckBox::SysColorChanged(check_box);
}
}
static void add_options_into_line(ConfigOptionsGroupShp &optgroup,
const std::vector<SamePair<std::string>> &prefixes,
const std::string &optkey,

View File

@ -577,6 +577,8 @@ public:
void build() override;
void toggle_options() override;
void update() override;
void msw_rescale() override;
void sys_color_changed() override;
bool supports_printer_technology(const PrinterTechnology tech) const override { return tech == ptSLA; }
};