Use Kirigami Placeholder Message instead of a Label in the SMS App
This commit makes use of the Kirigami.PlaceholderMessage component instead of a QML Label, also moves the placeholder message to be inside the ListView.
This commit is contained in:
parent
a6de73d437
commit
0d697a6452
1 changed files with 7 additions and 9 deletions
|
@ -46,15 +46,6 @@ Kirigami.ScrollablePage
|
|||
}
|
||||
]
|
||||
|
||||
Label {
|
||||
id: searchResultIndiactor
|
||||
visible: deviceConnected && view.count == 0 && view.headerItem.childAt(0, 0).text.length != 0
|
||||
anchors.centerIn: parent
|
||||
text: i18nd("kdeconnect-sms", "No matched results found : (")
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: loadingMessage
|
||||
visible: deviceConnected && view.count == 0 && view.headerItem.childAt(0, 0).text.length == 0
|
||||
|
@ -269,5 +260,12 @@ Kirigami.ScrollablePage
|
|||
currentIndex = -1
|
||||
focus = true
|
||||
}
|
||||
|
||||
Kirigami.PlaceholderMessage {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - (Kirigami.Units.largeSpacing * 4)
|
||||
visible: deviceConnected && view.count == 0 && view.headerItem.childAt(0, 0).text.length != 0
|
||||
text: i18ndc("kdeconnect-sms", "Placeholder message text when no messages are found", "No matches")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue