summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2019-04-26 18:49:37 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2019-04-26 18:49:37 +0200
commitf5940e2909da5dfb87291cdb6e7afa3960ce3f44 (patch)
treeb2e19044bd7c50a8645bb0e415913b0f98c545ba /editor
parent260530f01caa8ea3e2fb7bfda04f4bd718ae14f5 (diff)
Limit the size of the Manage Editor Feature Profiles dialog
This makes it more readable on large monitors.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index cbb7994635..df653d6d03 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2451,7 +2451,13 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case SETTINGS_MANAGE_FEATURE_PROFILES: {
- feature_profile_manager->popup_centered_ratio();
+ Size2 popup_size = Size2(900, 800) * editor_get_scale();
+ Size2 window_size = get_viewport()->get_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);
+
+ feature_profile_manager->popup_centered(popup_size);
} break;
case SETTINGS_TOGGLE_FULLSCREEN: {