1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 00:29:41 +02:00

Avoid too-small prefs dialog

Prefs dialog can now be more compact, but the tree control gains scrollers which look poor.  So a height of at least 480px, if no height was set by the user, is used.  This way also the key config prefs have reasonable height.

Doesn't set the min size.  On small screens, users can scrunch the dialog up tightly if they really want to.
This commit is contained in:
James Crook 2018-04-11 23:10:17 +01:00
parent 8e32c2df5d
commit 47bbedb20e

View File

@ -355,11 +355,13 @@ PrefsDialog::PrefsDialog
if( !mUniquePage ){
int prefWidth, prefHeight;
gPrefs->Read(wxT("/Prefs/Width"), &prefWidth, sz.x);
gPrefs->Read(wxT("/Prefs/Height"), &prefHeight, sz.y);
gPrefs->Read(wxT("/Prefs/Height"), &prefHeight, wxMax(480,sz.y));
wxSize prefSize = wxSize(prefWidth, prefHeight);
prefSize.DecTo(screenRect.GetSize());
SetSize(prefSize);
InvalidateBestSize();
Layout();
}
SetMinSize(sz);