mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
48 lines
1.2 KiB
QML
48 lines
1.2 KiB
QML
/*
|
|
* SPDX-FileCopyrightText: 2012 Marco Martin <mart@kde.org>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
import org.kde.plasma.core as PlasmaCore
|
|
|
|
Rectangle {
|
|
id: root
|
|
|
|
visible: false //adjust borders is run during setup. We want to avoid painting till completed
|
|
property Item containment
|
|
|
|
color: !containment || containment.plasmoid.backgroundHints == PlasmaCore.Types.NoBackground ? "transparent" : Kirigami.Theme.textColor
|
|
|
|
onContainmentChanged: {
|
|
containment.parent = root;
|
|
containment.visible = true;
|
|
containment.anchors.fill = root;
|
|
|
|
// HACK: add PanelView into the containment so that it can be used
|
|
if (containment.panel !== undefined) {
|
|
containment.panel = panel;
|
|
}
|
|
}
|
|
|
|
Binding {
|
|
target: panel
|
|
property: "backgroundHints"
|
|
when: containment
|
|
value: {
|
|
if (!containment) {
|
|
return;
|
|
}
|
|
|
|
return containment.plasmoid.backgroundHints;
|
|
}
|
|
restoreMode: Binding.RestoreBinding
|
|
}
|
|
|
|
Component.onCompleted: {
|
|
visible = true
|
|
}
|
|
}
|