diff --git a/aegisub/src/options.cpp b/aegisub/src/options.cpp index 43a40f440..15e156d4c 100644 --- a/aegisub/src/options.cpp +++ b/aegisub/src/options.cpp @@ -123,11 +123,7 @@ void OptionsManager::LoadDefaults(bool onlyDefaults,bool doOverride) { SetText(_T("Spell Checker"),_T("hunspell")); SetModificationType(MOD_AUTOMATIC); SetBool(_T("Link time boxes commit"),true); -#ifdef WIN32 SetBool(_T("Insert mode on time boxes"),true); -#else - SetBool(_T("Insert mode on time boxes"),false); -#endif SetModificationType(MOD_EDIT_BOX); SetBool(_T("Call tips enabled"),false,1700); SetBool(_T("Syntax highlight enabled"),true); diff --git a/aegisub/src/timeedit_ctrl.cpp b/aegisub/src/timeedit_ctrl.cpp index 1e0d08fb1..9652e9c4a 100644 --- a/aegisub/src/timeedit_ctrl.cpp +++ b/aegisub/src/timeedit_ctrl.cpp @@ -46,11 +46,17 @@ #include "vfr.h" #include "options.h" +// Use the multiline style only on wxGTK to workaround some wxGTK bugs with the default singleline style +#ifdef __WXGTK__ +#define TimeEditWindowStyle wxTE_MULTILINE | wxTE_CENTRE +#else +#define TimeEditWindowStyle wxTE_CENTRE +#endif /////////////// // Constructor TimeEdit::TimeEdit(wxWindow* parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name) : -wxTextCtrl(parent,id,value,pos,size,wxTE_CENTRE | style,validator,name) +wxTextCtrl(parent,id,value,pos,size,TimeEditWindowStyle | style,validator,name) { // Set validator wxTextValidator val(wxFILTER_INCLUDE_CHAR_LIST); @@ -72,6 +78,14 @@ wxTextCtrl(parent,id,value,pos,size,wxTE_CENTRE | style,validator,name) // Other stuff if (!value) SetValue(time.GetASSFormated()); + // This is a multiline control on wxGTK so we need to size it manually there +#ifdef __WXGTK__ + int w, h; + GetTextExtent(GetValue(),&w,&h); + w += 20; + h += 5; + SetSizeHints(w,h,w,h); +#endif ready = true; byFrame = false; isEnd = false;