From 2f244895d2799d53d6bc0a2ab98f41cee7052320 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 20 Mar 2019 11:12:37 +0100 Subject: [PATCH] Small fix for cancel button text on Linux --- src/slic3r/GUI/ProgressStatusBar.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/ProgressStatusBar.cpp b/src/slic3r/GUI/ProgressStatusBar.cpp index 8cdb53c9d..83c5e5b24 100644 --- a/src/slic3r/GUI/ProgressStatusBar.cpp +++ b/src/slic3r/GUI/ProgressStatusBar.cpp @@ -5,8 +5,11 @@ #include #include #include + #include "GUI_App.hpp" +#include "I18N.hpp" + #include namespace Slic3r { @@ -22,7 +25,7 @@ ProgressStatusBar::ProgressStatusBar(wxWindow *parent, int id): wxDefaultSize)), m_cancelbutton(new wxButton(self, -1, - "Cancel", + _(L("Cancel")), wxDefaultPosition, wxDefaultSize)) { @@ -33,6 +36,9 @@ ProgressStatusBar::ProgressStatusBar(wxWindow *parent, int id): int w[] = {-1, 150, 155}; self->SetStatusWidths(3, w); + wxSize s = m_cancelbutton->GetTextExtent(m_cancelbutton->GetLabel()); + self->SetMinHeight(int(2 * self->GetBorderY() + 1.2 * s.GetHeight())); + self->Bind(wxEVT_TIMER, [this](const wxTimerEvent&) { if (m_prog->IsShown()) m_timer->Stop(); if(is_busy()) m_prog->Pulse();