Editors hide unwieldy scale options

This commit is contained in:
2024-11-25 20:25:12 -06:00
committed by Celtic Minstrel
parent 3fe527af14
commit 494f0e8533
2 changed files with 30 additions and 0 deletions

View File

@@ -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<cLed&>(prefsDlog["nosound"]).setState(get_bool_pref("PlaySounds", true) ? led_off : led_red);
prefsDlog.run();