From 17cb59d966c238a80cabf5cb948acdc5128452ca Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Mon, 29 Sep 2014 20:25:17 +0200 Subject: [PATCH] fewer items --- .../components/NotificationStripe.qml | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/shell/contents/components/NotificationStripe.qml b/shell/contents/components/NotificationStripe.qml index 7b8f5ac5..d9b1ca2e 100644 --- a/shell/contents/components/NotificationStripe.qml +++ b/shell/contents/components/NotificationStripe.qml @@ -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 + } + } } \ No newline at end of file