From 0a93172265e7a7fa8f58665bf8370f8dcfedc051 Mon Sep 17 00:00:00 2001 From: Steve Daulton Date: Mon, 15 Jan 2018 22:02:37 +0000 Subject: [PATCH] Cautions re. size of Preference pages Clarify meaning / purpose of assert in PrefsDialog and add scrollers to pages that may grow in future versions. --- src/prefs/EffectsPrefs.cpp | 2 ++ src/prefs/GUIPrefs.cpp | 2 ++ src/prefs/PrefsDialog.cpp | 12 +++++++----- src/prefs/TracksBehaviorsPrefs.cpp | 2 ++ src/prefs/TracksPrefs.cpp | 2 ++ 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/prefs/EffectsPrefs.cpp b/src/prefs/EffectsPrefs.cpp index 4cd445eca..cea14bd9b 100644 --- a/src/prefs/EffectsPrefs.cpp +++ b/src/prefs/EffectsPrefs.cpp @@ -57,6 +57,7 @@ void EffectsPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); + S.StartScroller(); S.StartStatic(_("Enable Effects")); { @@ -158,6 +159,7 @@ void EffectsPrefs::PopulateOrExchange(ShuttleGui & S) true); } S.EndStatic(); + S.EndScroller(); #endif } diff --git a/src/prefs/GUIPrefs.cpp b/src/prefs/GUIPrefs.cpp index 950183052..642fba702 100644 --- a/src/prefs/GUIPrefs.cpp +++ b/src/prefs/GUIPrefs.cpp @@ -124,6 +124,7 @@ void GUIPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); + S.StartScroller(); S.StartStatic(_("Display")); { S.StartMultiColumn(2); @@ -206,6 +207,7 @@ void GUIPrefs::PopulateOrExchange(ShuttleGui & S) true); } S.EndStatic(); + S.EndScroller(); } bool GUIPrefs::Commit() diff --git a/src/prefs/PrefsDialog.cpp b/src/prefs/PrefsDialog.cpp index f8a1c220e..d7c1b9267 100644 --- a/src/prefs/PrefsDialog.cpp +++ b/src/prefs/PrefsDialog.cpp @@ -332,11 +332,13 @@ PrefsDialog::PrefsDialog mCategories->ExpandNode(iPage, it->expanded); } - // This ASSERT used to limit us to 800 x 600. - // However, we think screens have got bigger now, and that was a bit too restrictive. - // The impetus for increasing the limit (before we ASSERT) was that this ASSERT - // was firing with wxWidgets 3.0, which has slightly different sizer behaviour. - // Now takes display size into account to counter firing with high dpi displays. + // This ASSERT was originally used to limit us to 800 x 600. + // However, the range of screen sizes and dpi of modern (2018) displays + // makes pixel dimensions an inadequate measure of usability, so + // now we only ASSERT that preferences will fit in the client display + // rectangle of the developer / tester's monitor. + // Use scrollers when necessary to ensure that preference pages will + // be fully visible. wxRect screenRect(wxGetClientDisplayRect()); wxASSERT_MSG(sz.x <= screenRect.width && sz.y <= screenRect.height, wxT("Preferences dialog exceeds max size")); diff --git a/src/prefs/TracksBehaviorsPrefs.cpp b/src/prefs/TracksBehaviorsPrefs.cpp index 79a79d6e0..ae9e213a7 100644 --- a/src/prefs/TracksBehaviorsPrefs.cpp +++ b/src/prefs/TracksBehaviorsPrefs.cpp @@ -60,6 +60,7 @@ void TracksBehaviorsPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); + S.StartScroller(); S.StartStatic(_("Behaviors")); { S.TieCheckBox(_("A&uto-select, if selection required"), @@ -104,6 +105,7 @@ void TracksBehaviorsPrefs::PopulateOrExchange(ShuttleGui & S) S.EndMultiColumn(); } S.EndStatic(); + S.EndScroller(); } bool TracksBehaviorsPrefs::Commit() diff --git a/src/prefs/TracksPrefs.cpp b/src/prefs/TracksPrefs.cpp index c7fa1a81d..aada49310 100644 --- a/src/prefs/TracksPrefs.cpp +++ b/src/prefs/TracksPrefs.cpp @@ -120,6 +120,7 @@ void TracksPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); + S.StartScroller(); S.StartStatic(_("Display")); { S.TieCheckBox(_("&Pinned Recording/Playback head"), @@ -183,6 +184,7 @@ void TracksPrefs::PopulateOrExchange(ShuttleGui & S) } } S.EndStatic(); + S.EndScroller(); } bool TracksPrefs::GetPinnedHeadPreference()