Warning, /plasma/plasma-nano/shell/contents/views/Desktop.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2012 Marco Martin <mart@kde.org> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 2.0 0008 import QtQuick.Layouts 1.1 0009 0010 import org.kde.plasma.core as PlasmaCore 0011 import org.kde.kirigami 2.20 as Kirigami 0012 0013 Rectangle { 0014 id: root 0015 0016 visible: false //adjust borders is run during setup. We want to avoid painting till completed 0017 property Item containment 0018 0019 color: containment && containment.plasmoid.backgroundHints == PlasmaCore.Types.NoBackground ? "transparent" : Kirigami.Theme.textColor 0020 0021 function toggleWidgetExplorer(containment) { 0022 console.log("Widget Explorer toggled"); 0023 if (widgetExplorerStack.source != "") { 0024 widgetExplorerStack.source = ""; 0025 } else { 0026 widgetExplorerStack.setSource(Qt.resolvedUrl("../explorer/WidgetExplorer.qml"), {"containment": containment, "containmentInterface": root.containment}) 0027 } 0028 } 0029 0030 Loader { 0031 id: widgetExplorerStack 0032 z: 99 0033 asynchronous: true 0034 anchors.fill: parent 0035 0036 onLoaded: { 0037 if (widgetExplorerStack.item) { 0038 item.closed.connect(function() { 0039 widgetExplorerStack.source = "" 0040 }); 0041 0042 item.topPanelHeight = containment.availableScreenRect.y 0043 item.bottomPanelHeight = root.height - (containment.availableScreenRect.height + containment.availableScreenRect.y) 0044 0045 item.leftPanelWidth = containment.availableScreenRect.x 0046 item.rightPanelWidth = root.width - (containment.availableScreenRect.width + containment.availableScreenRect.x) 0047 } 0048 } 0049 } 0050 0051 onContainmentChanged: { 0052 containment.parent = root; 0053 containment.visible = true; 0054 containment.anchors.fill = root; 0055 } 0056 0057 Component.onCompleted: { 0058 visible = true 0059 } 0060 }