From 80785a2ff3c47fe274618ec04681e2837da40c60 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Thu, 25 Jul 2024 18:57:06 -0400 Subject: [PATCH] Use a Kirigami.PlaceholderMessage in the ignored list This makes it look cleaner when there's nothing there, and looks standard beside other KDE applications. Also removes a duplicate "Ignored Users" form header that didn't add anything. --- src/settings/IgnoredUsersDialog.qml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/settings/IgnoredUsersDialog.qml b/src/settings/IgnoredUsersDialog.qml index 8e2e7505f..094bcc602 100644 --- a/src/settings/IgnoredUsersDialog.qml +++ b/src/settings/IgnoredUsersDialog.qml @@ -20,15 +20,19 @@ FormCard.FormCardPage { width: Kirigami.Units.gridUnit * 16 height: Kirigami.Units.gridUnit * 32 - FormCard.FormHeader { - title: i18nc("@title:group", "Ignored Users") + children: Kirigami.PlaceholderMessage { + icon.name: "im-invisible-user" + text: i18nc("Placeholder message when no user is ignored", "No ignored users") + visible: repeater.count === 0 + + anchors.centerIn: parent } FormCard.FormCard { - FormCard.FormTextDelegate { - text: i18nc("Placeholder message when no user is ignored", "You are not ignoring any users") - visible: repeater.count === 0 - } + visible: repeater.count > 0 + + Layout.topMargin: Kirigami.Units.largeSpacing + Repeater { id: repeater model: root.connection.ignoredUsers()