From 571c9d9b7a5b76c449da98e4182f9dda75ec1e99 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 7 May 2014 10:43:01 -0700 Subject: [PATCH] Don't hardcode the size of buttons with translatable labels. Closes #1750. --- src/subs_edit_box.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/subs_edit_box.cpp b/src/subs_edit_box.cpp index c655a7f97..cc3e1d54f 100644 --- a/src/subs_edit_box.cpp +++ b/src/subs_edit_box.cpp @@ -118,7 +118,8 @@ SubsEditBox::SubsEditBox(wxWindow *parent, agi::Context *context) style_box = MakeComboBox("Default", wxCB_READONLY, &SubsEditBox::OnStyleChange, _("Style for this line")); - style_edit_button = new wxButton(this, -1, _("Edit"), wxDefaultPosition, wxSize(50, -1)); + style_edit_button = new wxButton(this, -1, _("Edit"), wxDefaultPosition, + wxSize(GetTextExtent(_("Edit")).GetWidth() + 20, -1)); style_edit_button->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) { if (active_style) { wxArrayString font_list = wxFontEnumerator::GetFacenames();