From eeb9268800e9fffc78c3bfa550ede7da48b249cb Mon Sep 17 00:00:00 2001 From: Michael Alexsander Silva Dias Date: Thu, 8 Aug 2019 23:22:33 -0300 Subject: Minor cosmetic changes in some editor plugins --- editor/plugins/asset_library_editor_plugin.cpp | 7 ++++--- editor/plugins/script_editor_plugin.cpp | 10 +++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'editor/plugins') diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index b5231ce468..4a2295fab2 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -407,8 +407,6 @@ void EditorAssetLibraryItemDownload::configure(const String &p_title, int p_asse icon->set_texture(get_icon("DefaultProjectIcon", "EditorIcons")); host = p_download_url; sha256 = p_sha256_hash; - asset_installer->connect("confirmed", this, "_close"); - dismiss->set_normal_texture(get_icon("Close", "EditorIcons")); _make_request(); } @@ -416,9 +414,11 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) { switch (p_what) { - case NOTIFICATION_READY: { + // FIXME: The editor crashes if 'NOTICATION_THEME_CHANGED' is used. + case NOTIFICATION_ENTER_TREE: { add_style_override("panel", get_stylebox("panel", "TabContainer")); + dismiss->set_normal_texture(get_icon("Close", "EditorIcons")); } break; case NOTIFICATION_PROCESS: { @@ -571,6 +571,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() { asset_installer = memnew(EditorAssetInstaller); add_child(asset_installer); + asset_installer->connect("confirmed", this, "_close"); prev_status = -1; diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index becf60bf28..ec391186c3 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -56,7 +56,7 @@ void ScriptEditorBase::_bind_methods() { ADD_SIGNAL(MethodInfo("request_open_script_at_line", PropertyInfo(Variant::OBJECT, "script"), PropertyInfo(Variant::INT, "line"))); ADD_SIGNAL(MethodInfo("request_save_history")); ADD_SIGNAL(MethodInfo("go_to_help", PropertyInfo(Variant::STRING, "what"))); - // TODO This signal is no use for VisualScript... + // TODO: This signal is no use for VisualScript. ADD_SIGNAL(MethodInfo("search_in_files_requested", PropertyInfo(Variant::STRING, "text"))); } @@ -205,11 +205,13 @@ void ScriptEditorQuickOpen::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - connect("confirmed", this, "_confirmed"); - search_box->set_right_icon(get_icon("Search", "EditorIcons")); search_box->set_clear_button_enabled(true); + FALLTHROUGH; + } + case NOTIFICATION_THEME_CHANGED: { + search_box->set_right_icon(get_icon("Search", "EditorIcons")); } break; case NOTIFICATION_EXIT_TREE: { disconnect("confirmed", this, "_confirmed"); @@ -242,6 +244,8 @@ ScriptEditorQuickOpen::ScriptEditorQuickOpen() { set_hide_on_ok(false); search_options->connect("item_activated", this, "_confirmed"); search_options->set_hide_root(true); + search_options->set_hide_folding(true); + search_options->add_constant_override("draw_guides", 1); } ///////////////////////////////// -- cgit v1.2.3