summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2019-08-08 23:22:33 -0300
committerMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2019-08-08 23:22:33 -0300
commiteeb9268800e9fffc78c3bfa550ede7da48b249cb (patch)
tree5477bce3b992fa37d3a948c26cb4873b9263df34
parentfe3cd5175589c27c3564224b317bbc0177a5a735 (diff)
Minor cosmetic changes in some editor plugins
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp7
-rw-r--r--editor/plugins/script_editor_plugin.cpp10
-rw-r--r--editor/quick_open.cpp10
3 files changed, 16 insertions, 11 deletions
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);
}
/////////////////////////////////
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp
index dc2f098333..4e1c900ee4 100644
--- a/editor/quick_open.cpp
+++ b/editor/quick_open.cpp
@@ -256,16 +256,16 @@ void EditorQuickOpen::_confirmed() {
void EditorQuickOpen::_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");
} break;
}
@@ -289,7 +289,6 @@ EditorQuickOpen::EditorQuickOpen() {
VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc);
- //set_child_rect(vbc);
search_box = memnew(LineEdit);
vbc->add_margin_child(TTR("Search:"), search_box);
search_box->connect("text_changed", this, "_text_changed");
@@ -302,6 +301,7 @@ EditorQuickOpen::EditorQuickOpen() {
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);
ei = "EditorIcons";
ot = "Object";