mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-11 00:47:22 +00:00
Unpage convergence quick settings
This commit is contained in:
parent
c38b32042b
commit
6d766892b5
1 changed files with 46 additions and 3 deletions
|
|
@ -222,18 +222,61 @@ Item {
|
||||||
// Quick settings view
|
// Quick settings view
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.minimumHeight: rowCount * rowHeight
|
Layout.minimumHeight: root.isConvergence ? convergenceFlow.implicitHeight : rowCount * rowHeight
|
||||||
|
|
||||||
opacity: brightnessPressedValue
|
opacity: brightnessPressedValue
|
||||||
|
|
||||||
|
Flow {
|
||||||
|
id: convergenceFlow
|
||||||
|
visible: root.isConvergence
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: implicitHeight
|
||||||
|
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
model: root.quickSettingsModel
|
||||||
|
delegate: MobileShell.BaseItem {
|
||||||
|
required property var modelData
|
||||||
|
|
||||||
|
readonly property bool __hidden: root.isManagementTile(modelData.settingsCommand)
|
||||||
|
height: __hidden ? 0 : root.rowHeight
|
||||||
|
width: __hidden ? 0 : root.columnWidth
|
||||||
|
visible: !__hidden
|
||||||
|
padding: Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
|
contentItem: QuickSettingsFullDelegate {
|
||||||
|
restrictedPermissions: actionDrawer.restrictedPermissions
|
||||||
|
|
||||||
|
text: modelData.text
|
||||||
|
status: modelData.status
|
||||||
|
icon: modelData.icon
|
||||||
|
enabled: modelData.enabled
|
||||||
|
settingsCommand: modelData.settingsCommand
|
||||||
|
toggleFunction: modelData.toggle
|
||||||
|
|
||||||
|
onCloseRequested: {
|
||||||
|
actionDrawer.close();
|
||||||
|
}
|
||||||
|
onDetailRequested: (pluginId) => {
|
||||||
|
detailPopup.show(pluginId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SwipeView {
|
SwipeView {
|
||||||
id: swipeView
|
id: swipeView
|
||||||
// we need to clip this view here to prevent the other quick settings pages from being visible
|
// we need to clip this view here to prevent the other quick settings pages from being visible
|
||||||
// when fullViewProgress is not less then 1 and the base view is no longer being clipped
|
// when fullViewProgress is not less then 1 and the base view is no longer being clipped
|
||||||
clip: true
|
clip: true
|
||||||
|
visible: !root.isConvergence
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: rowCount * rowHeight
|
Layout.preferredHeight: visible ? rowCount * rowHeight : 0
|
||||||
|
Layout.maximumHeight: visible ? rowCount * rowHeight : 0
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: Math.ceil(quickSettingsCount / pageSize)
|
model: Math.ceil(quickSettingsCount / pageSize)
|
||||||
|
|
@ -292,7 +335,7 @@ Item {
|
||||||
// Avoid wasting space when not loaded
|
// Avoid wasting space when not loaded
|
||||||
Layout.maximumHeight: active ? item.implicitHeight : 0
|
Layout.maximumHeight: active ? item.implicitHeight : 0
|
||||||
|
|
||||||
active: swipeView.count > 1 ? true: false
|
active: !root.isConvergence && swipeView.count > 1 ? true: false
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
|
||||||
sourceComponent: PageIndicator {
|
sourceComponent: PageIndicator {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue