FIX:fix three icons in dark mode not switching

jira: none
Change-Id: I0b49e3dc2e4d9ae7f53e45e456de830736f0acc8
(cherry picked from commit 38abdcdcdc1e49455e131b20cc29af888d56531c)
This commit is contained in:
zhou.xu
2025-03-12 12:10:38 +08:00
committed by Noisyfox
parent aeaafff9ed
commit 616082ae12
6 changed files with 39 additions and 20 deletions

View File

@@ -1912,6 +1912,14 @@ Sidebar::Sidebar(Plater *parent)
Sidebar::~Sidebar() {}
void Sidebar::on_change_color_mode(bool is_dark) {
const ModelObjectPtrs &mos = wxGetApp().model().objects;
for (int i = 0; i < mos.size(); i++) {
wxGetApp().obj_list()->update_info_items(i,nullptr,false,true);
}
}
void Sidebar::create_printer_preset()
{
CreatePrinterPresetDialog dlg(wxGetApp().mainframe);
@@ -8999,6 +9007,7 @@ void Plater::priv::on_apple_change_color_mode(wxSysColourChangedEvent& evt) {
void Plater::priv::on_change_color_mode(SimpleEvent& evt) {
m_is_dark = wxGetApp().app_config->get("dark_color_mode") == "1";
sidebar->on_change_color_mode(m_is_dark);
view3D->get_canvas3d()->on_change_color_mode(m_is_dark);
preview->get_canvas3d()->on_change_color_mode(m_is_dark);
assemble_view->get_canvas3d()->on_change_color_mode(m_is_dark);