Changeset View
Changeset View
Standalone View
Standalone View
src/controls/SearchField.qml
Show All 39 Lines | |||||
40 | Kirigami.ActionTextField | 40 | Kirigami.ActionTextField | ||
41 | { | 41 | { | ||
42 | id: root | 42 | id: root | ||
43 | 43 | | |||
44 | placeholderText: qsTr("Search...") | 44 | placeholderText: qsTr("Search...") | ||
45 | focusSequence: "Ctrl+F" | 45 | focusSequence: "Ctrl+F" | ||
46 | rightActions: [ | 46 | rightActions: [ | ||
47 | Kirigami.Action { | 47 | Kirigami.Action { | ||
48 | iconName: LayoutMirroring.enabled ? "edit-clear-rtl" : "edit-clear" | 48 | iconName: root.LayoutMirroring.enabled ? "edit-clear-rtl" : "edit-clear" | ||
49 | visible: root.text.length > 0 | 49 | visible: root.text.length > 0 | ||
50 | onTriggered: { | 50 | onTriggered: { | ||
51 | root.text = "" | 51 | root.text = "" | ||
52 | root.accepted() | 52 | root.accepted() | ||
53 | } | 53 | } | ||
54 | } | 54 | } | ||
55 | ] | 55 | ] | ||
56 | } | 56 | } |