@@ -43,7 +43,6 @@ StyledItem {
4343 readonly property bool draggable: (type === Notification.SnapDecision && state === "contracted") ||
4444 type === Notification.Interactive ||
4545 type === Notification.Ephemeral
46− readonly property bool canBeClosed: type === Notification.Ephemeral
4746 readonly property real defaultOpacity: 0.95
4847 property bool hasMouse
4948 property url background: ""
@@ -136,6 +135,8 @@ StyledItem {
136135 visible: !fullscreen
137136 anchors {
138137 fill: parent
138+ leftMargin: notification.margins
139+ rightMargin: notification.margins
139140 }
140141 backgroundColor: parent.color
141142 radius: "small"
@@ -196,12 +197,11 @@ StyledItem {
196197 drag.axis: Drag.XAxis
197198 drag.minimumX: -notification.width
198199 drag.maximumX: notification.width
200+ hoverEnabled: true
199201
200202 onClicked: {
201203 if (notification.type === Notification.Interactive) {
202204 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
203− } else if (hasMouse && canBeClosed) {
204− notification.notification.close()
205205 } else {
206206 notificationList.currentIndex = index;
207207 }
@@ -215,6 +215,20 @@ StyledItem {
215215 }
216216 }
217217
218+ NotificationButton {
219+ width: units.gu(2)
220+ height: width
221+ radius: width / 2
222+ visible: draggable && (containsMouse || interactiveArea.containsMouse)
223+ iconName: "close"
224+ outline: false
225+ color: theme.palette.normal.negative
226+ anchors.horizontalCenter: parent.left
227+ anchors.verticalCenter: parent.top
228+
229+ onClicked: notification.notification.close()
230+ }
231+
218232 Column {
219233 id: outterColumn
220234 objectName: "outterColumn"