From ad471bf3dbe6e1d5b1687b2e55cf37dc9e7f4069 Mon Sep 17 00:00:00 2001 From: "chunmao.guo" Date: Fri, 23 Sep 2022 14:36:24 +0800 Subject: [PATCH] FIX: missing border in static box on Linux Change-Id: I2105608cf74c5bc40caf383d3086ff852beaa07d --- src/slic3r/GUI/Widgets/StaticBox.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Widgets/StaticBox.cpp b/src/slic3r/GUI/Widgets/StaticBox.cpp index 538a812249..e318a3916f 100644 --- a/src/slic3r/GUI/Widgets/StaticBox.cpp +++ b/src/slic3r/GUI/Widgets/StaticBox.cpp @@ -34,6 +34,8 @@ StaticBox::StaticBox(wxWindow* parent, bool StaticBox::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) { + if (style & wxBORDER_NONE) + border_width = 0; wxWindow::Create(parent, id, pos, size, style); state_handler.attach({&border_color, &background_color, &background_color2}); state_handler.update_binds(); @@ -150,7 +152,7 @@ void StaticBox::doRender(wxDC& dc) if (background_color2.count() == 0) { if ((border_width && border_color.count() > 0) || background_color.count() > 0) { wxRect rc(0, 0, size.x, size.y); - if (border_width && border_color.count() > 0 && (GetWindowStyle() & wxBORDER_NONE) == 0) { + if (border_width && border_color.count() > 0) { if (dc.GetContentScaleFactor() == 1.0) { int d = floor(border_width / 2.0); int d2 = floor(border_width - 1);