ENH: refine text colour in filament map dialog

jira: NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I33218d7b16f150049d8078cf360a58c01594b0a7
This commit is contained in:
xun.zhang 2025-03-21 16:15:49 +08:00 committed by lane.wei
parent 75241aae61
commit 84786cc6a8
1 changed files with 4 additions and 1 deletions

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);