Warning, /plasma/layer-shell-qt/tests/quicktest.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *   SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleix.pol_gonzalez@mercedes-benz.com>
0003  *
0004  *   SPDX-License-Identifier: LGPL-3.0-or-later
0005  */
0006 
0007 import QtQuick 2.15
0008 import org.kde.layershell 1.0 as LayerShell
0009 
0010 Item
0011 {
0012     Text {
0013         text: "A normal Window"
0014         anchors.centerIn: parent
0015     }
0016 
0017     Window {
0018         LayerShell.Window.anchors: LayerShell.Window.AnchorLeft
0019         LayerShell.Window.layer: LayerShell.Window.LayerBackground
0020         LayerShell.Window.exclusionZone: -1
0021 
0022         width: 200
0023         height: 150
0024         Rectangle {
0025             anchors.fill: parent
0026             color: "green"
0027 
0028             Text {
0029                 anchors.centerIn: parent
0030                 text: "left bg"
0031             }
0032         }
0033         visible: true
0034     }
0035 
0036 
0037     Window {
0038         LayerShell.Window.scope: "dock"
0039         LayerShell.Window.anchors: LayerShell.Window.AnchorLeft
0040         LayerShell.Window.layer: LayerShell.Window.LayerTop
0041         LayerShell.Window.exclusionZone: width
0042 
0043         width: 100
0044         height: 100
0045         Rectangle {
0046             anchors.fill: parent
0047             color: "red"
0048 
0049             Text {
0050                 anchors.centerIn: parent
0051                 text: "left"
0052             }
0053         }
0054         visible: true
0055     }
0056 
0057     Window {
0058         LayerShell.Window.scope: "normal"
0059         LayerShell.Window.anchors: LayerShell.Window.AnchorRight
0060 
0061         width: 100
0062         height: 100
0063         Rectangle {
0064             anchors.fill: parent
0065             color: "red"
0066 
0067             Text {
0068                 anchors.centerIn: parent
0069                 text: "right"
0070             }
0071         }
0072         visible: true
0073     }
0074 
0075     Window {
0076         LayerShell.Window.scope: "normal"
0077         LayerShell.Window.anchors: LayerShell.Window.AnchorTop
0078 
0079         width: 100
0080         height: 100
0081         Rectangle {
0082             anchors.fill: parent
0083             color: "red"
0084 
0085             Text {
0086                 anchors.centerIn: parent
0087                 text: "top"
0088             }
0089         }
0090         visible: true
0091     }
0092 
0093     Window {
0094         LayerShell.Window.scope: "normal"
0095         LayerShell.Window.anchors: LayerShell.Window.AnchorBottom
0096 
0097         width: 100
0098         height: 100
0099         Rectangle {
0100             anchors.fill: parent
0101             color: "red"
0102 
0103             Text {
0104                 anchors.centerIn: parent
0105                 text: "bottom"
0106             }
0107         }
0108         visible: true
0109     }
0110 }