From 494f0e8533878d05dda8d76ac4386329d277bc98 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 25 Nov 2024 20:25:12 -0600 Subject: [PATCH] Editors hide unwieldy scale options --- src/pcedit/pc.main.cpp | 15 +++++++++++++++ src/scenedit/scen.main.cpp | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/pcedit/pc.main.cpp b/src/pcedit/pc.main.cpp index b2588ccf..90a208f4 100644 --- a/src/pcedit/pc.main.cpp +++ b/src/pcedit/pc.main.cpp @@ -571,6 +571,21 @@ void pick_preferences() { uiScale["other"].hide(); } + // Disable buttons for scales that won't fit on scenario designer's screen: + double max_main_window_scale = fallback_scale(); + if(max_main_window_scale < 4.0){ + uiScale["4"].hide(); + } + if(max_main_window_scale < 3.0){ + uiScale["3"].hide(); + } + if(max_main_window_scale < 2.0){ + uiScale["2"].hide(); + } + if(max_main_window_scale < 1.5){ + uiScale["1_5"].hide(); + } + dynamic_cast(prefsDlog["nosound"]).setState(get_bool_pref("PlaySounds", true) ? led_off : led_red); prefsDlog.run(); diff --git a/src/scenedit/scen.main.cpp b/src/scenedit/scen.main.cpp index de6968e1..be9a1a07 100644 --- a/src/scenedit/scen.main.cpp +++ b/src/scenedit/scen.main.cpp @@ -733,6 +733,21 @@ void pick_preferences() { } else { uiScale["other"].hide(); } + + // Disable buttons for scales that won't fit on scenario designer's screen: + double max_main_window_scale = fallback_scale(); + if(max_main_window_scale < 4.0){ + uiScale["4"].hide(); + } + if(max_main_window_scale < 3.0){ + uiScale["3"].hide(); + } + if(max_main_window_scale < 2.0){ + uiScale["2"].hide(); + } + if(max_main_window_scale < 1.5){ + uiScale["1_5"].hide(); + } dynamic_cast(prefsDlog["nosound"]).setState(get_bool_pref("PlaySounds", true) ? led_off : led_red);