From d9fd104e08bbf2cfd3bc4d07cd8e8cb4114ba4d1 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Sat, 25 Jun 2022 14:38:47 -0400 Subject: [PATCH] lockscreen: Fix margins of notifications and centering --- .../qml/widgets/notifications/NotificationsWidget.qml | 2 +- look-and-feel/contents/lockscreen/LockScreenNarrowContent.qml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml b/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml index 1917b57f..978752bd 100644 --- a/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml +++ b/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml @@ -333,7 +333,7 @@ Item { Item { id: toolButtons - height: spacer.height + toolLayout.height + toolLayout.anchors.topMargin + toolLayout.anchors.bottomMargin + height: visible ? spacer.height + toolLayout.height + toolLayout.anchors.topMargin + toolLayout.anchors.bottomMargin : 0 // do not show on lockscreen visible: !root.actionsRequireUnlock diff --git a/look-and-feel/contents/lockscreen/LockScreenNarrowContent.qml b/look-and-feel/contents/lockscreen/LockScreenNarrowContent.qml index 5e312c4a..3cf067ae 100644 --- a/look-and-feel/contents/lockscreen/LockScreenNarrowContent.qml +++ b/look-and-feel/contents/lockscreen/LockScreenNarrowContent.qml @@ -71,12 +71,11 @@ Loader { lockScreenState: root.lockScreenState notificationsModel: root.notificationsModel + Layout.alignment: Qt.AlignHCenter Layout.fillHeight: true Layout.fillWidth: true Layout.maximumWidth: PlasmaCore.Units.gridUnit * (25 + 2) // clip margins topMargin: PlasmaCore.Units.gridUnit - leftMargin: PlasmaCore.Units.gridUnit - rightMargin: PlasmaCore.Units.gridUnit onPasswordRequested: root.passwordRequested() onNotificationsShownChanged: root.notificationsShown = notificationsShown