Warning, /plasma/plasma-mobile/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 0008 import QtQuick.Controls as QQC2 0009 import QtQuick.Layouts 0010 0011 import org.kde.kirigami 2.12 as Kirigami 0012 import org.kde.ksvg 1.0 as KSvg 0013 import org.kde.plasma.private.mobileshell as MobileShell 0014 import org.kde.plasma.core as PlasmaCore 0015 0016 /** 0017 * Quick settings panel for landscape view (right sidebar). 0018 * For the portrait view quicksettings container, see QuickSettingsDrawer. 0019 */ 0020 MobileShell.BaseItem { 0021 id: root 0022 0023 required property var actionDrawer 0024 0025 required property real fullScreenHeight 0026 0027 /** 0028 * Implicit height of the contents of the panel. 0029 */ 0030 readonly property real contentImplicitHeight: column.implicitHeight 0031 0032 // we need extra padding since the background side border is enabled 0033 topPadding: Kirigami.Units.smallSpacing * 4 0034 leftPadding: Kirigami.Units.smallSpacing * 4 0035 rightPadding: Kirigami.Units.smallSpacing * 4 0036 bottomPadding: Kirigami.Units.smallSpacing * 4 0037 0038 background: KSvg.FrameSvgItem { 0039 enabledBorders: KSvg.FrameSvgItem.AllBorders 0040 imagePath: "widgets/background" 0041 } 0042 0043 contentItem: Item { 0044 id: containerItem 0045 0046 // use container item so that our column doesn't get stretched if base item is anchored 0047 ColumnLayout { 0048 id: column 0049 anchors.left: parent.left 0050 anchors.right: parent.right 0051 anchors.top: parent.top 0052 height: root.fullScreenHeight 0053 spacing: 0 0054 0055 MobileShell.StatusBar { 0056 id: statusBar 0057 Layout.alignment: Qt.AlignTop 0058 Layout.fillWidth: true 0059 Layout.preferredHeight: Kirigami.Units.gridUnit * 1.5 0060 Layout.maximumHeight: Kirigami.Units.gridUnit * 1.5 0061 0062 Kirigami.Theme.colorSet: Kirigami.Theme.Window 0063 Kirigami.Theme.inherit: false 0064 0065 backgroundColor: "transparent" 0066 showSecondRow: false 0067 showDropShadow: false 0068 showTime: false 0069 0070 // security reasons, system tray also doesn't work on lockscreen 0071 disableSystemTray: actionDrawer.restrictedPermissions 0072 } 0073 0074 MobileShell.QuickSettings { 0075 id: quickSettings 0076 0077 mode: QuickSettings.ScrollView 0078 width: column.width 0079 implicitHeight: quickSettings.fullHeight 0080 0081 Layout.alignment: Qt.AlignTop 0082 Layout.fillWidth: true 0083 Layout.maximumHeight: root.fullScreenHeight - root.topPadding - root.bottomPadding - statusBar.height - Kirigami.Units.smallSpacing 0084 Layout.maximumWidth: column.width 0085 0086 actionDrawer: root.actionDrawer 0087 minimizedViewProgress: 0 0088 fullViewProgress: 1 0089 } 0090 0091 Item { Layout.fillHeight: true } 0092 } 0093 0094 Handle { 0095 id: handle 0096 anchors.horizontalCenter: parent.horizontalCenter 0097 anchors.bottom: parent.bottom 0098 } 0099 } 0100 } 0101