mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
use standard background when needed
This commit is contained in:
parent
37535f97ba
commit
ae4a2c7837
2 changed files with 15 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue