ENH: refine text colour in filament map dialog

jira: NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I33218d7b16f150049d8078cf360a58c01594b0a7
(cherry picked from commit 84786cc6a867060b51e9f616a4d69ba7a1217985)
This commit is contained in:
xun.zhang 2025-03-21 16:15:49 +08:00 committed by Noisyfox
parent e7e8fab7a0
commit 602d36d067

View file

@ -134,7 +134,10 @@ void ColorPanel::OnPaint(wxPaintEvent &event)
dc.SetTextForeground(m_color.GetLuminance() < 0.51 ? *wxWHITE : *wxBLACK); // set text color
dc.DrawLabel(label, wxRect(0, 0, svg_size, svg_size), wxALIGN_CENTER);
dc.SetTextForeground(*wxBLACK);
if(m_parent)
dc.SetTextForeground(this->m_parent->GetBackgroundColour().GetLuminance() < 0.51 ? *wxWHITE : *wxBLACK);
else
dc.SetTextForeground(*wxBLACK);
if (type_label.length() > 4) {
// text is too long
wxString first = type_label.Mid(0, 4);