shift-shell/tests/ActionDrawerTest.qml

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

81 lines
2.2 KiB
QML
Raw Normal View History

/*
* SPDX-FileCopyrightText: 2022 Aleix Pol Gonzalez <aleixpol@kde.org>
* 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 org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.components 3.0 as PC3
import org.kde.plasma.private.mobileshell as MobileShell
import org.kde.notificationmanager as NotificationManager
// This is a test app to conveniently test the Quick Settings that are available
// on the system without having to load a full Plasma Mobile shell.
//
// Do not expect changes in this file to change the plasma UX. Do not install.
//
// This can be executed by running `qmlscene QuickSettingsTest.qml`
ApplicationWindow {
width: 360
height: 720
visible: true
2024-07-27 03:47:44 +00:00
Image {
source: "assets/background.jpg"
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
}
2024-07-27 03:47:44 +00:00
MobileShell.StatusBar {
id: statusBar
z: 1
2024-07-27 03:47:44 +00:00
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
2024-07-27 03:47:44 +00:00
height: MobileShell.Constants.topPanelHeight
2024-07-27 03:47:44 +00:00
2023-07-25 18:34:47 +00:00
Kirigami.Theme.inherit: false
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
backgroundColor: "transparent"
2024-07-27 03:47:44 +00:00
showSecondRow: false
showDropShadow: true
showTime: true
disableSystemTray: true // prevent SIGABRT, since loading the system tray leads to bad... things
}
2024-07-27 03:47:44 +00:00
MobileShell.ActionDrawerOpenSurface {
anchors.fill: statusBar
actionDrawer: drawer
z: 1
}
2024-07-27 03:47:44 +00:00
MobileShell.ActionDrawer {
id: drawer
z: 1
anchors.fill: parent
visible: offset !== 0
2024-07-27 03:47:44 +00:00
notificationSettings: NotificationManager.Settings {}
notificationModelType: MobileShell.NotificationsModelType.WatchedNotificationsModel
notificationModel: NotificationManager.WatchedNotificationsModel {}
}
2024-07-27 03:47:44 +00:00
PC3.Label {
anchors.bottom: parent.bottom
anchors.bottomMargin: Kirigami.Units.gridUnit
anchors.horizontalCenter: parent.horizontalCenter
text: "Pull down the action drawer from the top."
color: "white"
}
}