FIX: fix plater UI

Jira: 10520
Change-Id: Iec4401862d1c28df45067dc9b545dafe1341eb35
(cherry picked from commit 94ceedf97faf2b99e104489e73de0e72c4d27fca)
This commit is contained in:
Mixian
2025-09-18 13:38:29 +08:00
committed by Noisyfox
parent 7e98754e9b
commit 00579388b1
6 changed files with 61 additions and 53 deletions
+7 -2
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;
+2 -1
View File
@@ -12,7 +12,7 @@ public:
public:
void ShowBadge(bool show);
void SetBorderColor(const wxColour &color);
private:
#ifdef __WXMSW__
void OnPaint(wxPaintEvent &evt);
@@ -26,6 +26,7 @@ private:
#ifdef __WXOSX__
ScalableButton * badge { nullptr };
#endif
wxColour borderColor_;
};
#endif // !slic3r_GUI_StaticGroup_hpp_