1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-04 22:49:07 +02:00

Theme to be a drop-down

Also moved checkbox options to end and got rid of 'ergonomic order of buttons' preference.
This commit is contained in:
James Crook 2017-04-06 15:13:09 +01:00
parent b8fcbd1471
commit ce37650d04
2 changed files with 43 additions and 36 deletions

View File

@ -85,6 +85,16 @@ void GUIPrefs::Populate()
mHtmlHelpChoices.Add(_("Local")); mHtmlHelpChoices.Add(_("Local"));
mHtmlHelpChoices.Add(_("From Internet")); mHtmlHelpChoices.Add(_("From Internet"));
mThemeCodes.Add( wxT("classic") );
mThemeCodes.Add( wxT("light") );
mThemeCodes.Add( wxT("dark") );
mThemeCodes.Add( wxT("custom") );
mThemeChoices.Add( _("Classic") );
mThemeChoices.Add( _("Light") );
mThemeChoices.Add( _("Dark") );
mThemeChoices.Add( _("Custom") );
GetRangeChoices(&mRangeChoices, &mRangeCodes); GetRangeChoices(&mRangeChoices, &mRangeCodes);
#if 0 #if 0
@ -108,24 +118,15 @@ void GUIPrefs::PopulateOrExchange(ShuttleGui & S)
S.StartStatic(_("Display")); S.StartStatic(_("Display"));
{ {
S.TieCheckBox(_("&Ergonomic order of Transport Toolbar buttons"),
wxT("/GUI/ErgonomicTransportButtons"),
true);
S.TieCheckBox(_("S&how 'How to Get Help' dialog box at program start up"),
wxT("/GUI/ShowSplashScreen"),
true);
S.AddSpace(10);
S.StartMultiColumn(2); S.StartMultiColumn(2);
{ {
#ifdef EXPERIMENTAL_DA
const wxString defaultTheme = wxT("dark");
#else
const wxString defaultTheme = wxT("classic");
#endif
const wxString defaultRange = wxString::Format(wxT("%d"), ENV_DB_RANGE); const wxString defaultRange = wxString::Format(wxT("%d"), ENV_DB_RANGE);
S.TieChoice(_("Meter dB &range:"),
ENV_DB_KEY,
defaultRange,
mRangeChoices,
mRangeCodes);
S.SetSizeHints(mRangeChoices);
S.TieChoice(_("&Language:"), S.TieChoice(_("&Language:"),
wxT("/Locale/Language"), wxT("/Locale/Language"),
@ -140,13 +141,37 @@ void GUIPrefs::PopulateOrExchange(ShuttleGui & S)
mHtmlHelpChoices, mHtmlHelpChoices,
mHtmlHelpCodes); mHtmlHelpCodes);
S.SetSizeHints(mHtmlHelpChoices); S.SetSizeHints(mHtmlHelpChoices);
S.TieChoice(_("Theme:"),
wxT("/GUI/Theme"),
defaultTheme,
mThemeChoices,
mThemeCodes);
S.SetSizeHints(mThemeChoices);
S.TieChoice(_("Meter dB &range:"),
ENV_DB_KEY,
defaultRange,
mRangeChoices,
mRangeCodes);
S.SetSizeHints(mRangeChoices);
} }
S.EndMultiColumn(); S.EndMultiColumn();
// S.AddSpace(10);
// JKC: This is a silly preference. Kept here as a reminder that we may
// later want to have configurable button order.
// S.TieCheckBox(_("&Ergonomic order of Transport Toolbar buttons"),
// wxT("/GUI/ErgonomicTransportButtons"),
// true);
} }
S.EndStatic(); S.EndStatic();
S.StartStatic(_("Behaviors")); S.StartStatic(_("Behaviors"));
{ {
S.TieCheckBox(_("S&how 'How to Get Help' dialog box at program start up"),
wxT("/GUI/ShowSplashScreen"),
true);
S.TieCheckBox(_("&Beep on completion of longer activities"), S.TieCheckBox(_("&Beep on completion of longer activities"),
wxT("/GUI/BeepOnCompletion"), wxT("/GUI/BeepOnCompletion"),
false); false);
@ -161,27 +186,6 @@ void GUIPrefs::PopulateOrExchange(ShuttleGui & S)
#endif #endif
} }
S.EndStatic(); S.EndStatic();
S.StartStatic(_("Theme"));
{
#ifdef EXPERIMENTAL_DA
S.StartRadioButtonGroup(wxT("/GUI/Theme"), wxT("dark"));
#else
S.StartRadioButtonGroup(wxT("/GUI/Theme"), wxT("classic"));
#endif
{
S.TieRadioButton(_("Classic"),
wxT("classic"));
S.TieRadioButton(_("Dark"),
wxT("dark"));
S.TieRadioButton(_("Light"),
wxT("light"));
S.TieRadioButton(_("Custom"),
wxT("custom"));
}
S.EndRadioButtonGroup();
}
S.EndStatic();
} }
bool GUIPrefs::Apply() bool GUIPrefs::Apply()

View File

@ -41,6 +41,9 @@ class GUIPrefs final : public PrefsPanel
wxArrayString mHtmlHelpCodes; wxArrayString mHtmlHelpCodes;
wxArrayString mHtmlHelpChoices; wxArrayString mHtmlHelpChoices;
wxArrayString mThemeCodes;
wxArrayString mThemeChoices;
wxArrayString mRangeCodes; wxArrayString mRangeCodes;
wxArrayString mRangeChoices; wxArrayString mRangeChoices;
}; };