summaryrefslogtreecommitdiffstats
path: root/editor/plugins/asset_library_editor_plugin.cpp
diff options
context:
space:
mode:
authorŁukasz Rutkowski <lukus178@gmail.com>2018-07-26 13:45:38 +0200
committerŁukasz Rutkowski <lukus178@gmail.com>2018-08-11 12:04:26 +0200
commite8a435c8cdc5778ebae5e66d983a7bc720f81e85 (patch)
treebcdea4f8fece7b12922c5037d22541ff7d179737 /editor/plugins/asset_library_editor_plugin.cpp
parent0fc1c4eda8acd97af36228ed1d947bb5cdb2634a (diff)
downloadredot-engine-e8a435c8cdc5778ebae5e66d983a7bc720f81e85.tar.gz
Add clear text button to LineEdit
- Add pressed state to clear button - Enable clear button on all inputs with search icon - Remove duplicate clear buttons - Fix rendering of icon for center and right alignments - Add clear button to more search fields - Add clear icon to default theme - Add method to control enabled state of clear button - Add property to enable clear button from inspector
Diffstat (limited to 'editor/plugins/asset_library_editor_plugin.cpp')
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index e98dfceb90..b7dc82bfb0 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -554,6 +554,8 @@ void EditorAssetLibrary::_notification(int p_what) {
error_tr->set_texture(get_icon("Error", "EditorIcons"));
reverse->set_icon(get_icon("Sort", "EditorIcons"));
+ filter->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
+ filter->set_clear_button_enabled(true);
error_label->raise();
} break;
@@ -604,6 +606,8 @@ void EditorAssetLibrary::_notification(int p_what) {
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"));
+ filter->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
+ filter->set_clear_button_enabled(true);
} break;
}
}