Compact bbl nozzle UI (#15083)

* init

* drop usage of StaticGroup for ExtruderGroup

* completely remove StaticGroup from project

* fix alignment of "Not installed" text

* fix crash on linux while clicking edit button

* Fix background color on macOS

---------

Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
yw4z
2026-09-18 23:43:42 +08:00
committed by GitHub
co-authored by Noisyfox
parent 9bd4432f27
commit c5f9257878
9 changed files with 157 additions and 155 deletions
+10 -2
View File
@@ -53,6 +53,13 @@ void StaticBox::SetCornerRadius(double radius)
Refresh();
}
// ORCA use when adding widgets to top to show it like LabeledStaticBox
void StaticBox::SetTopMargin(int margin)
{
this->top_margin = margin;
Refresh();
}
void StaticBox::SetBorderStyle(wxPenStyle style)
{
border_style = style;
@@ -198,7 +205,8 @@ void StaticBox::doRender(wxDC& dc)
int states = state_handler.states();
if (background_color2.count() == 0) {
if ((border_width && border_color.count() > 0) || background_color.count() > 0) {
wxRect rc(0, 0, size.x, size.y);
int topM = top_margin > 0 ? top_margin : 0;
wxRect rc(0, topM, size.x, size.y - topM);
if (border_width && border_color.count() > 0) {
const double scale = dc.GetContentScaleFactor();
@@ -245,6 +253,6 @@ void StaticBox::doRender(wxDC& dc)
if (badge.bmp().IsOk()) {
auto s = badge.bmp().GetScaledSize();
dc.DrawBitmap(badge.bmp(), size.x - s.x, 0);
dc.DrawBitmap(badge.bmp(), size.x - s.x, top_margin > 0 ? top_margin : 0);
}
}