1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Update icons when theme changed

This commit is contained in:
Poommetee Ketson
2018-02-25 23:04:16 +07:00
parent 08584b7e22
commit 2de1dfa42f
16 changed files with 117 additions and 41 deletions

View File

@@ -533,11 +533,9 @@ void EditorAssetLibrary::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
TextureRect *tf = memnew(TextureRect);
tf->set_texture(get_icon("Error", "EditorIcons"));
error_tr->set_texture(get_icon("Error", "EditorIcons"));
reverse->set_icon(get_icon("Sort", "EditorIcons"));
error_hb->add_child(tf);
error_label->raise();
} break;
@@ -585,6 +583,8 @@ void EditorAssetLibrary::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
library_scroll_bg->add_style_override("panel", get_stylebox("bg", "Tree"));
error_tr->set_texture(get_icon("Error", "EditorIcons"));
reverse->set_icon(get_icon("Sort", "EditorIcons"));
} break;
}
}
@@ -1452,6 +1452,8 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
error_label = memnew(Label);
error_label->add_color_override("color", get_color("error_color", "Editor"));
error_hb->add_child(error_label);
error_tr = memnew(TextureRect);
error_hb->add_child(error_tr);
description = NULL;