Adjust default editor popup sizes
This commit is contained in:
parent
75ff86f8f5
commit
7ff3b52dea
4 changed files with 32 additions and 4 deletions
|
@ -87,7 +87,14 @@ void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode) {
|
||||||
if (EditorSettings::get_singleton()->has_setting("interface/dialogs/create_new_node_bounds")) {
|
if (EditorSettings::get_singleton()->has_setting("interface/dialogs/create_new_node_bounds")) {
|
||||||
popup(EditorSettings::get_singleton()->get("interface/dialogs/create_new_node_bounds"));
|
popup(EditorSettings::get_singleton()->get("interface/dialogs/create_new_node_bounds"));
|
||||||
} else {
|
} else {
|
||||||
popup_centered_ratio();
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_dont_clear) {
|
if (p_dont_clear) {
|
||||||
|
|
|
@ -81,7 +81,14 @@ void ProjectExportDialog::popup_export() {
|
||||||
if (EditorSettings::get_singleton()->has_setting("interface/dialogs/export_bounds")) {
|
if (EditorSettings::get_singleton()->has_setting("interface/dialogs/export_bounds")) {
|
||||||
popup(EditorSettings::get_singleton()->get("interface/dialogs/export_bounds"));
|
popup(EditorSettings::get_singleton()->get("interface/dialogs/export_bounds"));
|
||||||
} else {
|
} else {
|
||||||
popup_centered_ratio();
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -768,7 +768,14 @@ void ProjectSettingsEditor::popup_project_settings() {
|
||||||
if (EditorSettings::get_singleton()->has_setting("interface/dialogs/project_settings_bounds")) {
|
if (EditorSettings::get_singleton()->has_setting("interface/dialogs/project_settings_bounds")) {
|
||||||
popup(EditorSettings::get_singleton()->get("interface/dialogs/project_settings_bounds"));
|
popup(EditorSettings::get_singleton()->get("interface/dialogs/project_settings_bounds"));
|
||||||
} else {
|
} else {
|
||||||
popup_centered_ratio();
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
globals_editor->update_category_list();
|
globals_editor->update_category_list();
|
||||||
_update_translations();
|
_update_translations();
|
||||||
|
|
|
@ -101,7 +101,14 @@ void EditorSettingsDialog::popup_edit_settings() {
|
||||||
if (EditorSettings::get_singleton()->has_setting("interface/dialogs/editor_settings_bounds")) {
|
if (EditorSettings::get_singleton()->has_setting("interface/dialogs/editor_settings_bounds")) {
|
||||||
popup(EditorSettings::get_singleton()->get("interface/dialogs/editor_settings_bounds"));
|
popup(EditorSettings::get_singleton()->get("interface/dialogs/editor_settings_bounds"));
|
||||||
} else {
|
} 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();
|
_focus_current_search_box();
|
||||||
|
|
Loading…
Reference in a new issue