1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-06 15:19:29 +02:00

Bug 1864 - Spectrogram settings dialog hides the checkbox for "Enable Spectral Selection"

Fixed by a more compact layout.
Also we now size the dialogs for unique pages to fit their contents.
This commit is contained in:
James Crook 2018-04-10 22:56:09 +01:00
parent 26860d9ef0
commit d1c2ff82f0
2 changed files with 58 additions and 48 deletions

View File

@ -352,13 +352,15 @@ PrefsDialog::PrefsDialog
sz.DecTo(screenRect.GetSize()); sz.DecTo(screenRect.GetSize());
int prefWidth, prefHeight; if( !mUniquePage ){
gPrefs->Read(wxT("/Prefs/Width"), &prefWidth, sz.x); int prefWidth, prefHeight;
gPrefs->Read(wxT("/Prefs/Height"), &prefHeight, sz.y); gPrefs->Read(wxT("/Prefs/Width"), &prefWidth, sz.x);
gPrefs->Read(wxT("/Prefs/Height"), &prefHeight, sz.y);
wxSize prefSize = wxSize(prefWidth, prefHeight); wxSize prefSize = wxSize(prefWidth, prefHeight);
prefSize.DecTo(screenRect.GetSize()); prefSize.DecTo(screenRect.GetSize());
SetSize(prefSize); SetSize(prefSize);
}
SetMinSize(sz); SetMinSize(sz);
// Center after all that resizing, but make sure it doesn't end up // Center after all that resizing, but make sure it doesn't end up
@ -500,9 +502,11 @@ void PrefsDialog::OnOK(wxCommandEvent & WXUNUSED(event))
mUniquePage->Commit(); mUniquePage->Commit();
} }
wxSize sz = GetSize(); if( !mUniquePage ){
gPrefs->Write(wxT("/Prefs/Width"), sz.x); wxSize sz = GetSize();
gPrefs->Write(wxT("/Prefs/Height"), sz.y); gPrefs->Write(wxT("/Prefs/Width"), sz.x);
gPrefs->Write(wxT("/Prefs/Height"), sz.y);
}
gPrefs->Flush(); gPrefs->Flush();
// Reads preference /GUI/Theme // Reads preference /GUI/Theme

View File

@ -171,54 +171,60 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
mDefaultsCheckbox = S.Id(ID_DEFAULTS).TieCheckBox(_("&Use Preferences"), mDefaulted); mDefaultsCheckbox = S.Id(ID_DEFAULTS).TieCheckBox(_("&Use Preferences"), mDefaulted);
} }
S.StartStatic(_("Scale")); S.StartMultiColumn(2,wxEXPAND);
{ {
S.StartTwoColumn(); S.SetStretchyCol( 0 );
S.SetStretchyCol( 1 );
S.StartStatic(_("Scale"),1);
{ {
S.Id(ID_SCALE).TieChoice(_("S&cale") + wxString(wxT(":")), S.StartMultiColumn(2,wxEXPAND);
mTempSettings.scaleType, {
&mScaleChoices); S.SetStretchyCol( 0 );
S.SetStretchyCol( 1 );
mMinFreq = S.Id(ID_SCALE).TieChoice(_("S&cale") + wxString(wxT(":")),
S.Id(ID_MINIMUM).TieNumericTextBox(_("Mi&nimum Frequency (Hz):"), mTempSettings.scaleType,
mTempSettings.minFreq, &mScaleChoices);
12); mMinFreq =
S.Id(ID_MINIMUM).TieNumericTextBox(_("Mi&n Frequency (Hz):"),
mMaxFreq = mTempSettings.minFreq,
S.Id(ID_MAXIMUM).TieNumericTextBox(_("Ma&ximum Frequency (Hz):"), 12);
mTempSettings.maxFreq, mMaxFreq =
12); S.Id(ID_MAXIMUM).TieNumericTextBox(_("Ma&x Frequency (Hz):"),
mTempSettings.maxFreq,
12);
}
S.EndMultiColumn();
} }
S.EndTwoColumn(); S.EndStatic();
}
S.EndStatic();
S.StartStatic(_("Colors")); S.StartStatic(_("Colors"),1);
{
S.StartTwoColumn();
{ {
mGain = S.StartMultiColumn(2,wxEXPAND);
S.Id(ID_GAIN).TieNumericTextBox(_("&Gain (dB):"), {
mTempSettings.gain, S.SetStretchyCol( 0 );
8); S.SetStretchyCol( 1 );
mGain =
S.Id(ID_GAIN).TieNumericTextBox(_("&Gain (dB):"),
mTempSettings.gain,
8);
mRange =
S.Id(ID_RANGE).TieNumericTextBox(_("&Range (dB):"),
mTempSettings.range,
8);
mRange = mFrequencyGain =
S.Id(ID_RANGE).TieNumericTextBox(_("&Range (dB):"), S.Id(ID_FREQUENCY_GAIN).TieNumericTextBox(_("High &boost (dB/dec):"),
mTempSettings.range, mTempSettings.frequencyGain,
8); 8);
}
S.EndMultiColumn();
mFrequencyGain = S.Id(ID_GRAYSCALE).TieCheckBox(_("Gra&yscale"),
S.Id(ID_FREQUENCY_GAIN).TieNumericTextBox(_("Frequency g&ain (dB/dec):"), mTempSettings.isGrayscale);
mTempSettings.frequencyGain,
4);
} }
S.EndStatic();
S.Id(ID_GRAYSCALE).TieCheckBox(_("Gra&yscale"),
mTempSettings.isGrayscale);
S.EndTwoColumn();
} }
S.EndStatic(); S.EndMultiColumn();
S.StartStatic(_("Algorithm")); S.StartStatic(_("Algorithm"));
{ {