Fix dark-theme backgrounds across device, HMS, and AMS UI on macOS

Give previously-bare panels a keyed background so the existing dark-UI walk
can theme them. Runtime-created widgets (HMS items, device firmware/nozzle
panels) route their whole subtree through one UpdateDarkUIWin(this) call
instead of per-widget darkModeColorFor, which also themes their child text
and follows live light/dark switches. Extruder-card chips re-apply their
colours from Sidebar::sys_color_changed so a live switch updates them too.
This commit is contained in:
SoftFever
2026-07-19 20:16:17 +08:00
parent bd854c5ce5
commit f7f0c82abb
9 changed files with 80 additions and 26 deletions

View File

@@ -538,6 +538,7 @@ void PrintingTaskPanel::create_panel(wxWindow* parent)
wxBoxSizer *bSizer_task_name = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *bSizer_task_name_hor = new wxBoxSizer(wxHORIZONTAL);
wxPanel* task_name_panel = new wxPanel(parent);
task_name_panel->SetBackgroundColour(*wxWHITE);
m_staticText_subtask_value = new wxStaticText(task_name_panel, wxID_ANY, _L("N/A"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT | wxST_ELLIPSIZE_END);
m_staticText_subtask_value->SetMaxSize(wxSize(FromDIP(600), -1));
@@ -705,6 +706,7 @@ void PrintingTaskPanel::create_panel(wxWindow* parent)
bSizer_text->Add(m_staticText_progress_left, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
m_printing_stage_panel = new wxPanel(penel_finish_time);
m_printing_stage_panel->SetBackgroundColour(*wxWHITE);
wxBoxSizer *printingstage_vertical_sizer = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *printingstage_horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);