From ae4a2c783755d3d7a72fd5e7ef462d0a630b5ff9 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 19 Jun 2015 18:14:25 -0700 Subject: [PATCH] use standard background when needed --- applets/notifications/contents/ui/main.qml | 3 +++ containments/homescreen/package/contents/ui/main.qml | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/applets/notifications/contents/ui/main.qml b/applets/notifications/contents/ui/main.qml index 5eb7390a..c17bf27f 100644 --- a/applets/notifications/contents/ui/main.qml +++ b/applets/notifications/contents/ui/main.qml @@ -22,6 +22,7 @@ import QtQuick 2.1 import QtQuick.Layouts 1.1 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.plasma.plasmoid 2.0 Item { id: root @@ -29,6 +30,8 @@ Item { Layout.minimumHeight: notificationView.contentsHeight + Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground + function addNotification(source, data, actions) { // Do not show duplicated notifications // Remove notifications that are sent again (odd, but true) diff --git a/containments/homescreen/package/contents/ui/main.qml b/containments/homescreen/package/contents/ui/main.qml index c8facfb1..a39469c8 100644 --- a/containments/homescreen/package/contents/ui/main.qml +++ b/containments/homescreen/package/contents/ui/main.qml @@ -131,6 +131,18 @@ Item { checkLastSpacer(); } } + onAppletChanged: { + if (applet.backgroundHints == PlasmaCore.Types.StandardBackground) { + applet.anchors.margins = background.margins.top; + } + } + PlasmaCore.FrameSvgItem { + id: background + z: -1 + anchors.fill: parent + imagePath: "widgets/background" + visible: applet.backgroundHints == PlasmaCore.Types.StandardBackground + } Layout.minimumWidth: root.width Layout.minimumHeight: Math.max(applet.Layout.minimumHeight, (root.height-applicationsView.headerItem.margin) / 2)