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
@@ -8,6 +8,7 @@
#include "uiDeviceUpdateVersion.h"
#include "slic3r/GUI/I18N.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/wxExtensions.hpp"
#include "slic3r/GUI/Widgets/Label.hpp" // Orca: explicit Label include
@@ -27,6 +28,7 @@ uiDeviceUpdateVersion::uiDeviceUpdateVersion(wxWindow* parent,
long style /*= wxTAB_TRAVERSAL*/)
: wxPanel(parent, id, pos, size, style)
{
SetBackgroundColour(*wxWHITE);
CreateWidgets();
}
@@ -110,4 +112,6 @@ void uiDeviceUpdateVersion::CreateWidgets()
SetSizer(main_sizer);
Layout();
wxGetApp().UpdateDarkUIWin(this);
}