shift-shell/shell/contents/views/Panel.qml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1,008 B
QML
Raw Normal View History

/*
2021-03-01 20:03:25 +00:00
* SPDX-FileCopyrightText: 2012 Marco Martin <mart@kde.org>
*
2021-03-01 20:03:25 +00:00
* SPDX-License-Identifier: GPL-2.0-or-later
*/
import QtQuick
import QtQuick.Layouts
import org.kde.plasma.core as PlasmaCore
2017-09-05 15:25:48 +00:00
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" : PlasmaCore.Theme.textColor
2017-09-05 15:25:48 +00:00
onContainmentChanged: {
containment.parent = root;
containment.visible = true;
containment.anchors.fill = root;
}
Binding {
target: panel
property: "backgroundHints"
when: containment
value: {
if (!containment) {
return;
}
return containment.plasmoid.backgroundHints;
}
restoreMode: Binding.RestoreBinding
}
Component.onCompleted: {
visible = true
}
}