From c5a6ba369c4e79b578eb8f06df97325cbc6c50a5 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Fri, 7 Feb 2020 10:30:20 -0700 Subject: [PATCH] Center placeholder texts in system tray popups Summary: We use this centered style in many other places and are moving towards using it everywhere. This patch applies the same style to the System Tray popups for notifications and devices, which were still using the old style. Test Plan: Notifications, before: {F8090822} Notifications, after: {F8090777} Device Notifier: before: {F8090825} Device Notifier, after: {F8090776} Reviewers: #vdg, #plasma, ndavis Reviewed By: #vdg, ndavis Subscribers: davidedmundson, ndavis, trmdi, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D27219 --- .../package/contents/ui/FullRepresentation.qml | 7 +++++-- .../package/contents/ui/FullRepresentation.qml | 9 ++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml b/applets/devicenotifier/package/contents/ui/FullRepresentation.qml index dcf62e3e5..cdf6d461b 100644 --- a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml +++ b/applets/devicenotifier/package/contents/ui/FullRepresentation.qml @@ -38,11 +38,14 @@ MouseArea { Layout.minimumHeight: units.gridUnit * 12 PlasmaExtras.Heading { - width: parent.width + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + wrapMode: Text.WordWrap level: 3 - opacity: 0.6 text: i18n("No Devices Available") visible: notifierDialog.count === 0 && !devicenotifier.pendingDelegateRemoval + enabled: false } PlasmaCore.DataSource { diff --git a/applets/notifications/package/contents/ui/FullRepresentation.qml b/applets/notifications/package/contents/ui/FullRepresentation.qml index b3c297126..3c7d5bac1 100644 --- a/applets/notifications/package/contents/ui/FullRepresentation.qml +++ b/applets/notifications/package/contents/ui/FullRepresentation.qml @@ -584,15 +584,14 @@ ColumnLayout{ } PlasmaExtras.Heading { - width: list.width - height: list.height - horizontalAlignment: Kirigami.Settings.isMobile ? Text.AlignHCenter : Text.AlignLeft - verticalAlignment: Kirigami.Settings.isMobile ? Text.AlignVCenter : Text.AlignTop + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter wrapMode: Text.WordWrap level: 3 - opacity: 0.6 text: i18n("No unread notifications.") visible: list.count === 0 && NotificationManager.Server.valid + enabled: false } ColumnLayout {