use standard background when needed

This commit is contained in:
Marco Martin 2015-06-19 18:14:25 -07:00
parent 37535f97ba
commit ae4a2c7837
2 changed files with 15 additions and 0 deletions

View file

@ -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)

View file

@ -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)