2022-04-07 18:11:08 +00:00
|
|
|
/*
|
|
|
|
|
* SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import QtQuick 2.15
|
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
|
import QtQuick.Window 2.2
|
|
|
|
|
|
|
|
|
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
|
|
|
|
import org.kde.plasma.private.nanoshell 2.0 as NanoShell
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Window with the ActionDrawer component embedded in it.
|
2024-07-27 03:47:44 +00:00
|
|
|
*
|
2022-04-07 18:11:08 +00:00
|
|
|
* Used for overlaying the ActionDrawer if the original window does not cover
|
|
|
|
|
* the whole screen.
|
|
|
|
|
*/
|
|
|
|
|
NanoShell.FullScreenOverlay {
|
|
|
|
|
id: window
|
2024-07-27 03:47:44 +00:00
|
|
|
|
2022-04-07 18:11:08 +00:00
|
|
|
/**
|
|
|
|
|
* The ActionDrawer component.
|
|
|
|
|
*/
|
|
|
|
|
property alias actionDrawer: drawer
|
2024-07-27 03:47:44 +00:00
|
|
|
|
2024-10-31 05:05:44 +00:00
|
|
|
visible: drawer.intendedToBeVisible
|
2022-04-07 18:11:08 +00:00
|
|
|
width: Screen.width
|
|
|
|
|
height: Screen.height
|
2024-07-27 03:47:44 +00:00
|
|
|
|
2022-04-07 18:11:08 +00:00
|
|
|
color: "transparent"
|
2024-07-27 03:47:44 +00:00
|
|
|
|
2024-07-28 19:55:58 +00:00
|
|
|
onVisibleChanged: {
|
|
|
|
|
if (visible) {
|
|
|
|
|
window.raise();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-07 18:11:08 +00:00
|
|
|
onActiveChanged: {
|
|
|
|
|
if (!active) {
|
|
|
|
|
drawer.close();
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-27 03:47:44 +00:00
|
|
|
|
2022-04-07 18:11:08 +00:00
|
|
|
ActionDrawer {
|
|
|
|
|
id: drawer
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
}
|
|
|
|
|
}
|