mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
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:
parent
3b034e7357
commit
03f57b0345
1 changed files with 2 additions and 12 deletions
|
|
@ -20,7 +20,7 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.2 as Controls
|
import QtQuick.Controls 2.2 as Controls
|
||||||
import QtQuick.Layouts 1.1
|
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.people 1.0 as KPeople
|
||||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||||
|
|
||||||
|
|
@ -35,20 +35,10 @@ Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Kirigami.ActionTextField {
|
Kirigami.SearchField {
|
||||||
id: searchField
|
id: searchField
|
||||||
visible: contactsList.count > 0
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: i18n("Search...")
|
|
||||||
rightActions: [
|
|
||||||
Kirigami.Action {
|
|
||||||
icon.name: "edit-clear"
|
|
||||||
onTriggered: searchField.text = ""
|
|
||||||
visible: searchField.text !== ""
|
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Controls.ScrollView {
|
Controls.ScrollView {
|
||||||
id: contactScrollView
|
id: contactScrollView
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue