From d2f42085fff73a76732185cfe8e140f639cf9ce5 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 17 Nov 2020 15:32:41 +0100 Subject: [PATCH] don't do ugly cutouts of the notifications --- .../contents/lockscreen/LockScreen.qml | 2 - .../contents/lockscreen/NotificationsList.qml | 62 ++++++++++++++++++- 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/look-and-feel/contents/lockscreen/LockScreen.qml b/look-and-feel/contents/lockscreen/LockScreen.qml index cb9a0c61..058866d0 100644 --- a/look-and-feel/contents/lockscreen/LockScreen.qml +++ b/look-and-feel/contents/lockscreen/LockScreen.qml @@ -170,9 +170,7 @@ PlasmaCore.ColorScope { bottom: scrollUpIcon.top bottomMargin: units.gridUnit left: parent.left - leftMargin: units.gridUnit right: parent.right - rightMargin: units.gridUnit } } diff --git a/look-and-feel/contents/lockscreen/NotificationsList.qml b/look-and-feel/contents/lockscreen/NotificationsList.qml index 85dd03d1..ac82b172 100644 --- a/look-and-feel/contents/lockscreen/NotificationsList.qml +++ b/look-and-feel/contents/lockscreen/NotificationsList.qml @@ -27,6 +27,65 @@ import "../components" Item { property alias notificationListHeight: notificationListView.contentHeight property int count: notificationListView.count + clip: true + + Rectangle { + z: 1 + anchors { + top: parent.top + left: parent.left + right: parent.right + } + visible: !notificationListView.atYBeginning + height: PlasmaCore.Units.gridUnit + gradient: Gradient { + GradientStop { + position: 1.0 + color: "transparent" + } + GradientStop { + position: 0.0 + color: Qt.rgba(0, 0, 0, 0.3) + } + } + Rectangle { + anchors { + left: parent.left + right: parent.right + } + height: 1 + color: Qt.rgba(1, 1, 1, 0.5) + } + } + Rectangle { + z: 1 + anchors { + left: parent.left + right: parent.right + bottom: parent.bottom + } + visible: !notificationListView.atYEnd + height: PlasmaCore.Units.gridUnit + gradient: Gradient { + GradientStop { + position: 1.0 + color: Qt.rgba(0, 0, 0, 0.3) + } + GradientStop { + position: 0.0 + color: "transparent" + } + } + Rectangle { + anchors { + left: parent.left + right: parent.right + bottom: parent.bottom + } + height: 1 + color: Qt.rgba(1, 1, 1, 0.5) + } + } ListView { id: notificationListView @@ -36,11 +95,12 @@ Item { top: parent.top left: parent.left right: parent.right + leftMargin: units.gridUnit + rightMargin: units.gridUnit } height: Math.min(contentHeight, parent.height) // don't take up the entire screen for notification list view interactive: contentHeight > parent.height // only allow scrolling on notifications list if it is long enough - clip: true opacity: 1 - (passwordFlickable.contentY / passwordFlickable.columnHeight) spacing: units.gridUnit