mirror of https://github.com/odrling/Aegisub
Made wx fall back to wxChoicebook if wxTreebook is unavailable.
Originally committed to SVN as r703.
This commit is contained in:
parent
8d4cdcbd7d
commit
0fec62dfd6
|
@ -66,7 +66,7 @@ BaseGrid::BaseGrid(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wx
|
|||
holding = false;
|
||||
|
||||
// Set font
|
||||
wxString fontname = Options.AsText(_T("Font Face"));
|
||||
wxString fontname = Options.AsText(_T("Grid Font Face"));
|
||||
if (fontname.IsEmpty()) fontname = _T("Tahoma");
|
||||
font.SetFaceName(fontname);
|
||||
font.SetPointSize(Options.AsInt(_T("Grid font size")));
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
#include "dialog_options.h"
|
||||
#ifdef wxUSE_TREEBOOK
|
||||
#include <wx/treebook.h>
|
||||
#else
|
||||
#define AddSubPage(a,b,c) AddPage(a,b,c)
|
||||
#endif
|
||||
#include "options.h"
|
||||
#include <wx/spinctrl.h>
|
||||
|
@ -55,9 +57,8 @@
|
|||
DialogOptions::DialogOptions(wxWindow *parent)
|
||||
: wxDialog(parent, -1, _T("Options"), wxDefaultPosition, wxDefaultSize)
|
||||
{
|
||||
#ifdef wxUSE_TREEBOOK
|
||||
// Create book
|
||||
book = new wxTreebook(this,-1,wxDefaultPosition,wxSize(100,100));
|
||||
book = new wxTreebook(this,-1,wxDefaultPosition,wxSize(400,300));
|
||||
needsRestart = false;
|
||||
|
||||
// Image list
|
||||
|
@ -197,7 +198,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
|
|||
// Second static box
|
||||
wxControl *control;
|
||||
wxString labels2[9] = { _("Normal"), _("Brackets"), _("Slashes and Parentheses"), _("Tags"), _("Parameters") , _("Error"), _("Error Background"), _("Line Break"), _("Modified Background") };
|
||||
wxString options2[11] = { _T("Normal"), _T("Brackets"), _T("Slashes"), _T("Tags"), _T("Parameters") , _T("Error"), _T("Error Background"), _T("Line Break"), _T("Edit box need enter background"), _T("Font Face"), _T("Font Size") };
|
||||
wxString options2[11] = { _T("Normal"), _T("Brackets"), _T("Slashes"), _T("Tags"), _T("Parameters") , _T("Error"), _T("Error Background"), _T("Line Break"), _T("Edit box need enter background"), _T("Edit Font Face"), _T("Edit Font Size") };
|
||||
for (int i=0;i<9;i++) {
|
||||
wxString caption = labels2[i]+_T(": ");
|
||||
wxString option = options2[i];
|
||||
|
@ -257,7 +258,6 @@ DialogOptions::DialogOptions(wxWindow *parent)
|
|||
|
||||
// Read
|
||||
ReadFromOptions();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -49,7 +49,8 @@
|
|||
#ifdef wxUSE_TREEBOOK
|
||||
class wxTreebook;
|
||||
#else
|
||||
typedef wxNotebook wxTreebook;
|
||||
#include <wx/choicebk.h>
|
||||
typedef wxChoicebook wxTreebook;
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -115,11 +115,11 @@ void OptionsManager::LoadDefaults() {
|
|||
SetColour(_T("Syntax Highlight Line Break"),wxColour(160,160,160));
|
||||
SetColour(_T("Edit Box Need Enter Background"),wxColour(192,192,255));
|
||||
#if defined(__WINDOWS__)
|
||||
SetInt(_T("Font Size"),9);
|
||||
SetInt(_T("Edit Font Size"),9);
|
||||
#else
|
||||
SetInt(_T("Font Size"),11);
|
||||
SetInt(_T("Edit Font Size"),11);
|
||||
#endif
|
||||
SetText(_T("Font Face"),_T(""));
|
||||
SetText(_T("Edit Font Face"),_T(""));
|
||||
|
||||
// Video Options
|
||||
SetModificationType(MOD_AUTOMATIC);
|
||||
|
@ -198,6 +198,7 @@ void OptionsManager::LoadDefaults() {
|
|||
#else
|
||||
SetInt(_T("Grid font size"),10);
|
||||
#endif
|
||||
SetText(_T("Grid Font Face"),_T(""));
|
||||
|
||||
// Audio Cosmetic
|
||||
SetInt(_T("Audio Spectrum Cutoff"),32);
|
||||
|
|
|
@ -170,9 +170,9 @@ END_EVENT_TABLE()
|
|||
void SubsTextEditCtrl::SetStyles() {
|
||||
// Styles
|
||||
wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||
wxString fontname = Options.AsText(_T("Font Face"));
|
||||
wxString fontname = Options.AsText(_T("Edit Font Face"));
|
||||
if (fontname != _T("")) font.SetFaceName(fontname);
|
||||
int size = Options.AsInt(_T("Font Size"));
|
||||
int size = Options.AsInt(_T("Edit Font Size"));
|
||||
|
||||
// Normal style
|
||||
StyleSetFont(0,font);
|
||||
|
|
Loading…
Reference in New Issue