diff --git a/components/mobileshell/qml/actiondrawer/ActionDrawer.qml b/components/mobileshell/qml/actiondrawer/ActionDrawer.qml index bbe0de7b..152e4241 100644 --- a/components/mobileshell/qml/actiondrawer/ActionDrawer.qml +++ b/components/mobileshell/qml/actiondrawer/ActionDrawer.qml @@ -14,6 +14,7 @@ import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.private.nanoshell 2.0 as NanoShell import org.kde.plasma.private.mobileshell as MobileShell import org.kde.kirigami 2.20 as Kirigami +import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS Item { id: root @@ -28,6 +29,11 @@ Item { */ property var notificationModelType: MobileShell.NotificationsModelType.NotificationsModel + /** + * The model for the quick settings. + */ + property var quickSettingsModel: QS.QuickSettingsModel {} + /** * The notification settings object to be used in the notification widget. */ @@ -261,6 +267,7 @@ Item { actionDrawer: root width: root.width height: root.height + quickSettingsModel: root.quickSettingsModel } } @@ -270,6 +277,7 @@ Item { actionDrawer: root width: root.width height: root.height + quickSettingsModel: root.quickSettingsModel } } } diff --git a/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml b/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml index 30c372de..38beeaaf 100644 --- a/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml +++ b/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml @@ -15,6 +15,7 @@ import org.kde.plasma.core as PlasmaCore import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.private.mobileshell as MobileShell +import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS /** * Root element that contains all the ActionDrawer's contents, and is anchored to the screen. @@ -23,6 +24,7 @@ Item { id: root required property var actionDrawer + property QS.QuickSettingsModel quickSettingsModel property alias notificationsWidget: notificationWidget @@ -169,6 +171,7 @@ Item { anchors.right: parent.right actionDrawer: root.actionDrawer + quickSettingsModel: root.quickSettingsModel fullScreenHeight: root.height transform: Translate { diff --git a/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml b/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml index 336bcbaf..f9cbbe74 100644 --- a/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml +++ b/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml @@ -12,6 +12,7 @@ import QtQuick.Window 2.2 import org.kde.plasma.private.mobileshell as MobileShell import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.kirigami 2.20 as Kirigami +import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS /** * Root element that contains all the ActionDrawer's contents, and is anchored to the screen. @@ -20,6 +21,7 @@ Item { id: root required property var actionDrawer + property QS.QuickSettingsModel quickSettingsModel property alias notificationsWidget: notificationWidget @@ -56,6 +58,7 @@ Item { anchors.right: parent.right actionDrawer: root.actionDrawer + quickSettingsModel: root.quickSettingsModel // opacity and move animation (disabled when openToPinnedMode is false) property real offsetDist: actionDrawer.offset - minimizedQuickSettingsOffset diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml index d81bdf38..ac7fcf38 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml @@ -25,6 +25,8 @@ Item { required property var actionDrawer required property int mode + property QS.QuickSettingsModel quickSettingsModel + enum Mode { Pages, ScrollView @@ -45,8 +47,6 @@ Item { property real minimizedViewProgress: 0 property real fullViewProgress: 1 - readonly property QS.QuickSettingsModel quickSettingsModel: QS.QuickSettingsModel {} - readonly property int columnCount: Math.floor(width/columnWidth) readonly property int rowCount: { let totalRows = Math.ceil(quickSettingsCount / columnCount); diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml index 578c5158..01504f07 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml @@ -13,6 +13,7 @@ import org.kde.ksvg 1.0 as KSvg import org.kde.plasma.core as PlasmaCore import org.kde.plasma.private.mobileshell as MobileShell +import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS /** * Quick settings drawer pulled down from the top (for portrait mode). @@ -23,6 +24,8 @@ MobileShell.BaseItem { required property var actionDrawer + property QS.QuickSettingsModel quickSettingsModel + /** * The amount of height to add to the panel (increasing the height of the quick settings area). */ @@ -95,6 +98,7 @@ MobileShell.BaseItem { mode: QuickSettings.Pages actionDrawer: root.actionDrawer + quickSettingsModel: root.quickSettingsModel minimizedViewProgress: 1 - root.minimizedToFullProgress fullViewProgress: root.minimizedToFullProgress height: root.minimizedQuickSettingsHeight + root.addedHeight diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml index b8809546..4571517e 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml @@ -12,6 +12,7 @@ import org.kde.kirigami 2.12 as Kirigami import org.kde.ksvg 1.0 as KSvg import org.kde.plasma.private.mobileshell as MobileShell import org.kde.plasma.core as PlasmaCore +import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS /** * Quick settings panel for landscape view (right sidebar). @@ -22,6 +23,11 @@ MobileShell.BaseItem { required property var actionDrawer + property QS.QuickSettingsModel quickSettingsModel + + /** + * The height of the entire screen the panel opens in. + */ required property real fullScreenHeight /** @@ -75,6 +81,7 @@ MobileShell.BaseItem { id: quickSettings mode: QuickSettings.ScrollView + quickSettingsModel: root.quickSettingsModel width: column.width implicitHeight: quickSettings.fullHeight