mirror of https://github.com/odrling/Aegisub
Fixed the "Overwrite-Insertion in time boxes" option on Linux and enabled it as the default mode for the time edit boxes on all OS's instead of just Windows
Originally committed to SVN as r3094.
This commit is contained in:
parent
bd4644d1bd
commit
4d0f48f303
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue