From ab6b00d10242f77077ebbac23132e5b917151839 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 4 Aug 2024 16:54:27 +0200 Subject: [PATCH] Expand columns in the audio interactive transition editor This prevents columns from being unusably narrow, especially on hiDPI displays. --- .../editor/audio_stream_interactive_editor_plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp b/modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp index e29cc753c93b..fcb477995ff9 100644 --- a/modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp +++ b/modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp @@ -34,6 +34,7 @@ #include "editor/editor_node.h" #include "editor/editor_string_names.h" #include "editor/editor_undo_redo_manager.h" +#include "editor/themes/editor_scale.h" #include "scene/gui/check_box.h" #include "scene/gui/option_button.h" #include "scene/gui/spin_box.h" @@ -290,7 +291,6 @@ void AudioStreamInteractiveTransitionEditor::edit(Object *p_obj) { } int min_w = header_font->get_string_size(name + "XX").width; - tree->set_column_expand(cell_index, false); tree->set_column_custom_minimum_width(cell_index, min_w); max_w = MAX(max_w, min_w); @@ -314,11 +314,10 @@ void AudioStreamInteractiveTransitionEditor::edit(Object *p_obj) { } } - tree->set_column_expand(header_index, false); tree->set_column_custom_minimum_width(header_index, max_w); selection_order.clear(); _update_selection(); - popup_centered_ratio(0.6); + popup_centered_clamped(Size2(900, 450) * EDSCALE); updating = false; _update_transitions(); } @@ -332,6 +331,7 @@ AudioStreamInteractiveTransitionEditor::AudioStreamInteractiveTransitionEditor() tree->set_hide_root(true); tree->add_theme_constant_override("draw_guides", 1); tree->set_select_mode(Tree::SELECT_MULTI); + tree->set_custom_minimum_size(Size2(400, 0) * EDSCALE); split->add_child(tree); tree->set_h_size_flags(Control::SIZE_EXPAND_FILL);