From 3fc7461071cd8b2bd1b701151c3d11af579b5129 Mon Sep 17 00:00:00 2001 From: yw4z Date: Tue, 21 Jul 2026 23:57:32 +0300 Subject: [PATCH] button alignment --- src/slic3r/GUI/Widgets/Button.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Widgets/Button.cpp b/src/slic3r/GUI/Widgets/Button.cpp index e236c84e67..1f0ea85e92 100644 --- a/src/slic3r/GUI/Widgets/Button.cpp +++ b/src/slic3r/GUI/Widgets/Button.cpp @@ -299,7 +299,7 @@ void Button::render(wxDC& dc) else icon = inactive_icon; wxSize padding = this->paddingSize; - int spacing = 5; + int spacing = GetLabel().IsEmpty() ? 0 : 5; // ORCA dont add spacing when no text in use. fixes alignment // Wrap text auto text = GetLabel(); if (vertical && textSize.x + padding.x * 2 > size.x) { @@ -379,14 +379,15 @@ void Button::messureSize() { wxClientDC dc(this); dc.GetTextExtent(GetLabel(), &textSize.width, &textSize.height, &textSize.x, &textSize.y); + int spacing = GetLabel().IsEmpty() ? 0 : 5; // ORCA dont add spacing when no text in use. fixes alignment wxSize szContent = textSize.GetSize(); if (this->active_icon.bmp().IsOk()) { if (szContent.y > 0) { //BBS norrow size between text and icon if (vertical) - szContent.y += 5; + szContent.y += spacing; // ORCA use spacing instead static value else - szContent.x += 5; + szContent.x += spacing; // ORCA use spacing instead static value } wxSize szIcon = this->active_icon.GetBmpSize(); if (vertical) {