From e9a54949109382079f1e290ec6cfc74f531be587 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 9 Jan 2013 19:44:26 -0800 Subject: [PATCH] Calculate the required size for the subs edit box time edits rather than hardcoding it --- aegisub/src/subs_edit_box.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aegisub/src/subs_edit_box.cpp b/aegisub/src/subs_edit_box.cpp index e992cbd0c..88d92a630 100644 --- a/aegisub/src/subs_edit_box.cpp +++ b/aegisub/src/subs_edit_box.cpp @@ -223,7 +223,7 @@ wxTextCtrl *SubsEditBox::MakeMarginCtrl(wxString const& tooltip, int margin, wxS } TimeEdit *SubsEditBox::MakeTimeCtrl(wxString const& tooltip, TimeField field) { - TimeEdit *ctrl = new TimeEdit(this, -1, c, "", wxSize(75,-1), field == TIME_END); + TimeEdit *ctrl = new TimeEdit(this, -1, c, "", wxSize(GetTextExtent(wxS(" 0:00:00.000 ")).GetWidth(),-1), field == TIME_END); ctrl->SetToolTip(tooltip); Bind(wxEVT_COMMAND_TEXT_UPDATED, [=](wxCommandEvent&) { CommitTimes(field); }, ctrl->GetId()); ctrl->Bind(wxEVT_CHAR_HOOK, time_edit_char_hook);