summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-08 11:36:16 +0100
committerGitHub <noreply@github.com>2019-02-08 11:36:16 +0100
commit6958953ffa1372e14725df92ae73fad53da924b1 (patch)
treee2f69ae88890c05137b67ba867ad9d687e4254ab
parent39d6dbbb9f87d2cd478243f14beb4369cd540670 (diff)
parentae9a23e36c2a0e2a018018dcfcb224611f14d887 (diff)
Merge pull request #25515 from Zylann/search_bar_bottom
Moved script editor search bar to the bottom
-rw-r--r--editor/code_editor.cpp9
-rw-r--r--editor/editor_help.cpp8
2 files changed, 9 insertions, 8 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 4ab9a72694..4609ba1036 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1226,15 +1226,16 @@ CodeTextEditor::CodeTextEditor() {
ED_SHORTCUT("script_editor/zoom_out", TTR("Zoom Out"), KEY_MASK_CMD | KEY_MINUS);
ED_SHORTCUT("script_editor/reset_zoom", TTR("Reset Zoom"), KEY_MASK_CMD | KEY_0);
+ text_editor = memnew(TextEdit);
+ add_child(text_editor);
+ text_editor->set_v_size_flags(SIZE_EXPAND_FILL);
+
+ // Added second to it opens at the bottom, so it won't shift the entire text editor when opening
find_replace_bar = memnew(FindReplaceBar);
add_child(find_replace_bar);
find_replace_bar->set_h_size_flags(SIZE_EXPAND_FILL);
find_replace_bar->hide();
- text_editor = memnew(TextEdit);
- add_child(text_editor);
- text_editor->set_v_size_flags(SIZE_EXPAND_FILL);
-
find_replace_bar->set_text_edit(text_editor);
text_editor->set_show_line_numbers(true);
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index f8cee6883b..7061d38a2a 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -1423,10 +1423,6 @@ EditorHelp::EditorHelp() {
EDITOR_DEF("text_editor/help/sort_functions_alphabetically", true);
- find_bar = memnew(FindBar);
- add_child(find_bar);
- find_bar->hide();
-
class_desc = memnew(RichTextLabel);
add_child(class_desc);
class_desc->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -1434,6 +1430,10 @@ EditorHelp::EditorHelp() {
class_desc->connect("meta_clicked", this, "_class_desc_select");
class_desc->connect("gui_input", this, "_class_desc_input");
+ // Added second so it opens at the bottom so it won't offset the entire widget
+ find_bar = memnew(FindBar);
+ add_child(find_bar);
+ find_bar->hide();
find_bar->set_rich_text_label(class_desc);
class_desc->set_selection_enabled(true);