Don't hardcode the size of buttons with translatable labels. Closes #1750.

This commit is contained in:
Thomas Goyne 2014-05-07 10:43:01 -07:00
parent 049142f6f6
commit 571c9d9b7a
1 changed files with 2 additions and 1 deletions

View File

@ -118,7 +118,8 @@ SubsEditBox::SubsEditBox(wxWindow *parent, agi::Context *context)
style_box = MakeComboBox("Default", wxCB_READONLY, &SubsEditBox::OnStyleChange, _("Style for this line")); 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&) { style_edit_button->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) {
if (active_style) { if (active_style) {
wxArrayString font_list = wxFontEnumerator::GetFacenames(); wxArrayString font_list = wxFontEnumerator::GetFacenames();