summaryrefslogtreecommitdiffstats
path: root/editor/project_settings_editor.cpp
diff options
context:
space:
mode:
authorhomer666 <homer666@users.noreply.github.com>2019-04-27 05:36:44 +1000
committerhomer666 <homer666@users.noreply.github.com>2019-04-30 05:35:43 +1000
commit80e9e93e27622e1c03a4da0ef130367191a7b996 (patch)
treed21bfc3ed32d0f4fe669cfec8f02971f69f954b7 /editor/project_settings_editor.cpp
parent7018de8425e8c2781071595fdcf565acdfde2be4 (diff)
downloadredot-engine-80e9e93e27622e1c03a4da0ef130367191a7b996.tar.gz
Add Popup::popup_centered_clamped method
- Also replace redundant duplicate code in editor dialogs with calls to popup_centered_clamped()
Diffstat (limited to 'editor/project_settings_editor.cpp')
-rw-r--r--editor/project_settings_editor.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 2d7ad8bc04..0dd9807fbf 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -793,15 +793,9 @@ void ProjectSettingsEditor::popup_project_settings() {
if (saved_size != Rect2()) {
popup(saved_size);
} else {
-
- 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);
+ popup_centered_clamped(Size2(900, 700) * EDSCALE, 0.8);
}
+
globals_editor->update_category_list();
_update_translations();
autoload_settings->update_autoload();