FIX: support dark mode for nozzle

jira: [STUDIO-9384]
Change-Id: I9fa2ae969f1ae3210773ab5db590595fd27bd3d8
(cherry picked from commit 0d2733db0b773b5d2eb11193b6e2d2d37ebd6a6f)
This commit is contained in:
xin.zhang 2025-01-01 14:13:24 +08:00 committed by Noisyfox
parent f127846914
commit 49d65c8ca5

View file

@ -434,8 +434,10 @@ void TempInput::render(wxDC &dc)
dc.SetFont(::Label::Body_12);
auto sepSize = dc.GetMultiLineTextExtent(wxString("L"));
dc.SetTextForeground(*wxWHITE);
dc.SetTextBackground(*wxWHITE);
const wxColour& clr = Slic3r::GUI::wxGetApp().dark_mode() ? StateColor::darkModeColorFor(*wxWHITE) : *wxWHITE;
dc.SetTextForeground(clr);
dc.SetTextBackground(clr);
dc.DrawText(wxString("L"), pt.x + (szIcon.x - sepSize.x) / 2, (size.y - sepSize.y) / 2);
pt.x += szIcon.x + 3;
}
@ -447,8 +449,10 @@ void TempInput::render(wxDC &dc)
dc.SetFont(::Label::Body_12);
auto sepSize = dc.GetMultiLineTextExtent(wxString("R"));
dc.SetTextForeground(*wxWHITE);
dc.SetTextBackground(*wxWHITE);
const wxColour& clr = Slic3r::GUI::wxGetApp().dark_mode() ? StateColor::darkModeColorFor(*wxWHITE) : *wxWHITE;
dc.SetTextForeground(clr);
dc.SetTextBackground(clr);
dc.DrawText(wxString("R"), pt.x + (szIcon.x - sepSize.x) / 2, (size.y - sepSize.y) / 2);
pt.x += szIcon.x + 3;
}