FIX: fix plater UI

Jira: 10520
Change-Id: Iec4401862d1c28df45067dc9b545dafe1341eb35
(cherry picked from commit 94ceedf97faf2b99e104489e73de0e72c4d27fca)
This commit is contained in:
Mixian
2025-02-25 17:49:18 +08:00
committed by Noisyfox
parent 7e98754e9b
commit 00579388b1
6 changed files with 61 additions and 53 deletions

View File

@@ -5,6 +5,7 @@ StaticGroup::StaticGroup(wxWindow *parent, wxWindowID id, const wxString &label)
{
SetBackgroundColour(*wxWHITE);
SetForegroundColour("#CECECE");
borderColor_ = wxColour("#CECECE");
#ifdef __WXMSW__
Bind(wxEVT_PAINT, &StaticGroup::OnPaint, this);
#endif
@@ -33,8 +34,12 @@ void StaticGroup::ShowBadge(bool show)
#endif
}
#ifdef __WXMSW__
void StaticGroup::SetBorderColor(const wxColour &color)
{
borderColor_ = color;
}
#ifdef __WXMSW__
void StaticGroup::OnPaint(wxPaintEvent &evt)
{
wxStaticBox::OnPaint(evt);
@@ -62,7 +67,7 @@ void StaticGroup::PaintForeground(wxDC &dc, const struct tagRECT &rc)
while (image.GetBlue(0, bottom) == blue) --bottom;
// Draw border with foreground color
wxPoint polygon[] = { {left, top}, {0, top}, {0, bottom}, {rc.right - 1, bottom}, {rc.right - 1, top}, {right, top} };
dc.SetPen(wxPen(GetForegroundColour(), 1));
dc.SetPen(wxPen(borderColor_, 1));
for (int i = 1; i < 6; ++i) {
if (i == 4) // fix bottom right corner
++polygon[i - 1].y;