diff --git a/src/controls/SearchField.qml b/src/controls/SearchField.qml index b604670c..c168de9b 100644 --- a/src/controls/SearchField.qml +++ b/src/controls/SearchField.qml @@ -1,56 +1,56 @@ /* * Copyright (C) 2019 Carl-Lucien Schwan * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library/Lesser General Public License * version 2, or (at your option) any later version, as published by the * Free Software Foundation * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details * * You should have received a copy of the GNU Library/Lesser General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.6 import QtQuick.Controls 2.1 as Controls import org.kde.kirigami 2.7 as Kirigami /** * This is a standard textfield following KDE HIG. Using Ctrl+F as focus * sequence and "Search..." as placeholder text. * * Example usage for the search field component: * @code * import org.kde.kirigami 2.8 as Kirigami * * Kirigami.SearchField { * id: searchField * onAccepted: console.log("Search text is " + searchField.text) * } * @endcode * * @inherit org.kde.kirgami.ActionTextField */ Kirigami.ActionTextField { id: root placeholderText: qsTr("Search...") focusSequence: "Ctrl+F" rightActions: [ Kirigami.Action { - iconName: LayoutMirroring.enabled ? "edit-clear-rtl" : "edit-clear" + icon.name: root.LayoutMirroring.enabled ? "edit-clear-locationbar-ltr" : "edit-clear-locationbar-rtl" visible: root.text.length > 0 onTriggered: { root.text = "" root.accepted() } } ] }