Skip to content

Commit 877468a

Browse files
Jason Weilerjasonweiler
authored andcommitted
Adding a vertical splitter to the create node dialog so the descriptions are easier to read
Adding a vertical splitter to the create node dialog so the descriptions are easier to read clang-format conformity
1 parent 7864ac8 commit 877468a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

editor/doc/editor_help.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4533,6 +4533,7 @@ EditorHelpBit::EditorHelpBit(const String &p_symbol, const String &p_prologue, b
45334533
content = memnew(RichTextLabel);
45344534
content->set_theme_type_variation("EditorHelpBitContent");
45354535
content->set_custom_minimum_size(Size2(640 * EDSCALE, content_min_height));
4536+
content->set_v_size_flags(Control::SIZE_EXPAND_FILL);
45364537
content->set_selection_enabled(p_allow_selection);
45374538
content->set_context_menu_enabled(p_allow_selection);
45384539
content->set_selection_modifier(callable_mp_static(_replace_nbsp_with_space));

editor/gui/create_dialog.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,9 @@ CreateDialog::CreateDialog() {
863863
VSplitContainer *vsc = memnew(VSplitContainer);
864864
hsc->add_child(vsc);
865865

866+
VSplitContainer *vsc_right = memnew(VSplitContainer);
867+
hsc->add_child(vsc_right);
868+
866869
VBoxContainer *fav_vb = memnew(VBoxContainer);
867870
fav_vb->set_custom_minimum_size(Size2(150, 100) * EDSCALE);
868871
fav_vb->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -899,7 +902,8 @@ CreateDialog::CreateDialog() {
899902
VBoxContainer *vbc = memnew(VBoxContainer);
900903
vbc->set_custom_minimum_size(Size2(300, 0) * EDSCALE);
901904
vbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
902-
hsc->add_child(vbc);
905+
vbc->set_v_size_flags(Control::SIZE_EXPAND_FILL);
906+
vsc_right->add_child(vbc);
903907

904908
search_box = memnew(LineEdit);
905909
search_box->set_accessibility_name(TTRC("Search"));
@@ -928,9 +932,15 @@ CreateDialog::CreateDialog() {
928932

929933
help_bit = memnew(EditorHelpBit);
930934
help_bit->set_accessibility_name(TTRC("Description:"));
935+
help_bit->set_v_size_flags(Control::SIZE_EXPAND_FILL);
931936
help_bit->set_content_height_limits(80 * EDSCALE, 80 * EDSCALE);
932937
help_bit->connect("request_hide", callable_mp(this, &CreateDialog::_hide_requested));
933-
vbc->add_margin_child(TTR("Description:"), help_bit);
938+
939+
VBoxContainer *vbc_desc = memnew(VBoxContainer);
940+
vbc_desc->set_custom_minimum_size(Size2(300, 0) * EDSCALE);
941+
vbc_desc->add_margin_child(TTR("Description:"), help_bit, true);
942+
943+
vsc_right->add_child(vbc_desc);
934944

935945
register_text_enter(search_box);
936946
set_hide_on_ok(false);

0 commit comments

Comments
 (0)