summaryrefslogtreecommitdiff
path: root/editor/settings_config_dialog.cpp
diff options
context:
space:
mode:
authorhomer666 <homer666@users.noreply.github.com>2018-05-04 18:44:29 +1000
committerhomer666 <homer666@users.noreply.github.com>2018-05-05 12:09:56 +1000
commit7ff3b52dea5b19c3bee28f261d6b521afb717f3c (patch)
treed4370397e66c3b2bdd6b6e6fac3d4e0fd0943a68 /editor/settings_config_dialog.cpp
parent75ff86f8f5cf2364af9f12455fac2fd01bb48849 (diff)
Adjust default editor popup sizes
Diffstat (limited to 'editor/settings_config_dialog.cpp')
-rw-r--r--editor/settings_config_dialog.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index f50f9f6f5f..c3e9e4ab62 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -101,7 +101,14 @@ void EditorSettingsDialog::popup_edit_settings() {
if (EditorSettings::get_singleton()->has_setting("interface/dialogs/editor_settings_bounds")) {
popup(EditorSettings::get_singleton()->get("interface/dialogs/editor_settings_bounds"));
} else {
- popup_centered_ratio(0.7);
+
+ Size2 popup_size = Size2(900, 700) * editor_get_scale();
+ Size2 window_size = get_viewport_rect().size;
+
+ popup_size.x = MIN(window_size.x * 0.8, popup_size.x);
+ popup_size.y = MIN(window_size.y * 0.8, popup_size.y);
+
+ popup_centered(popup_size);
}
_focus_current_search_box();