Dialer: Port to Kirigami.SearchField

Also remove visible condition, it makes it impossible to remove the search query if no results are found.
This commit is contained in:
Jonah Brüchert 2019-10-17 02:06:24 +02:00 committed by Bhushan Shah
parent 3b034e7357
commit 03f57b0345

View file

@ -20,7 +20,7 @@
import QtQuick 2.0
import QtQuick.Controls 2.2 as Controls
import QtQuick.Layouts 1.1
import org.kde.kirigami 2.7 as Kirigami
import org.kde.kirigami 2.8 as Kirigami
import org.kde.people 1.0 as KPeople
import org.kde.plasma.core 2.0 as PlasmaCore
@ -35,21 +35,11 @@ Item {
ColumnLayout {
anchors.fill: parent
Kirigami.ActionTextField {
Kirigami.SearchField {
id: searchField
visible: contactsList.count > 0
Layout.fillWidth: true
placeholderText: i18n("Search...")
rightActions: [
Kirigami.Action {
icon.name: "edit-clear"
onTriggered: searchField.text = ""
visible: searchField.text !== ""
}
]
}
Controls.ScrollView {
id: contactScrollView
Layout.fillWidth: true