mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 17:54:45 +00:00
don't do ugly cutouts of the notifications
This commit is contained in:
parent
88198bb424
commit
d2f42085ff
2 changed files with 61 additions and 3 deletions
|
|
@ -170,9 +170,7 @@ PlasmaCore.ColorScope {
|
||||||
bottom: scrollUpIcon.top
|
bottom: scrollUpIcon.top
|
||||||
bottomMargin: units.gridUnit
|
bottomMargin: units.gridUnit
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: units.gridUnit
|
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: units.gridUnit
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,65 @@ import "../components"
|
||||||
Item {
|
Item {
|
||||||
property alias notificationListHeight: notificationListView.contentHeight
|
property alias notificationListHeight: notificationListView.contentHeight
|
||||||
property int count: notificationListView.count
|
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 {
|
ListView {
|
||||||
id: notificationListView
|
id: notificationListView
|
||||||
|
|
@ -36,11 +95,12 @@ Item {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
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
|
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
|
interactive: contentHeight > parent.height // only allow scrolling on notifications list if it is long enough
|
||||||
clip: true
|
|
||||||
opacity: 1 - (passwordFlickable.contentY / passwordFlickable.columnHeight)
|
opacity: 1 - (passwordFlickable.contentY / passwordFlickable.columnHeight)
|
||||||
spacing: units.gridUnit
|
spacing: units.gridUnit
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue