Warning, /plasma/libplasma/tests/dialog_fullscreen.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2014 Vishesh Handa <vhanda@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 import QtQuick 2.0
0008 
0009 import QtQuick.Controls 2.15 as Controls
0010 import QtQuick.Layouts 1.1
0011 
0012 import org.kde.plasma.core 2.0 as PlasmaCore
0013 
0014 
0015 PlasmaCore.Dialog {
0016     id: dialog
0017     location: PlasmaCore.Types.Floating
0018 
0019     ColumnLayout {
0020         Controls.Label {
0021             Layout.maximumWidth: rect.width
0022             wrapMode: Text.WordWrap
0023             text: "Clicking on the rectangle should toggle the full screen mode. Make sure it retains its original geometry when jumping in between full screen and normal"
0024         }
0025 
0026         Rectangle {
0027             id: rect
0028             color: "green"
0029 
0030             width: 500
0031             height: 500
0032 
0033             MouseArea {
0034                 anchors.fill: parent
0035                 onClicked: {
0036                     if (dialog.location != PlasmaCore.Types.FullScreen) {
0037                         dialog.location = PlasmaCore.Types.FullScreen;
0038                     }
0039                     else {
0040                         dialog.location = PlasmaCore.Types.Floating;
0041                     }
0042                 }
0043             }
0044         }
0045     }
0046 }