mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 07:03:08 +00:00
fewer items
This commit is contained in:
parent
c22bb7cc33
commit
17cb59d966
1 changed files with 28 additions and 14 deletions
|
|
@ -20,13 +20,15 @@
|
|||
import QtQuick 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
Rectangle {
|
||||
MouseArea {
|
||||
id: root
|
||||
|
||||
color: "#00000000"
|
||||
|
||||
height: units.gridUnit * 2
|
||||
width: parent.width
|
||||
anchors.bottomMargin: 10
|
||||
drag.axis: Drag.XAxis
|
||||
drag.target: root
|
||||
|
||||
property bool expanded: false
|
||||
property var textGradient: Gradient {
|
||||
|
|
@ -51,23 +53,19 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: root
|
||||
drag.axis: Drag.XAxis
|
||||
drag.target: root
|
||||
onReleased: {
|
||||
if (drag.active) {
|
||||
if (parent.x > width / 4 || parent.x < width / -4) {
|
||||
notificationsModel.remove(index);
|
||||
} else {
|
||||
parent.x = 0;
|
||||
}
|
||||
onReleased: {
|
||||
if (drag.active) {
|
||||
if (x > width / 4 || x < width / -4) {
|
||||
notificationsModel.remove(index);
|
||||
} else {
|
||||
parent.expanded = !parent.expanded;
|
||||
x = 0;
|
||||
}
|
||||
} else {
|
||||
expanded = !expanded;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PlasmaCore.IconItem {
|
||||
id: icon
|
||||
width: units.iconSizes.medium
|
||||
|
|
@ -135,4 +133,20 @@ Rectangle {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: extraArea
|
||||
width: parent.width
|
||||
height: parent.width
|
||||
anchors {
|
||||
left: summaryArea.right
|
||||
top: parent.top
|
||||
}
|
||||
|
||||
gradient: root.textGradient
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: textGradientOverlay
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue