diff --git a/components/mobileshell/qml/actiondrawer/private/ContentContainer.qml b/components/mobileshell/qml/actiondrawer/private/ContentContainer.qml index 8586f57e..fb315e74 100644 --- a/components/mobileshell/qml/actiondrawer/private/ContentContainer.qml +++ b/components/mobileshell/qml/actiondrawer/private/ContentContainer.qml @@ -186,6 +186,7 @@ Item { // In convergence, cap the height so it doesn't stretch full-screen maximumHeight: isConvergence ? root.height * 0.6 : -1 + toolButtonsItem: toolButtons } // Secondary swipe area for uses in portrait. diff --git a/components/mobileshell/qml/actiondrawer/private/NotificationDrawer.qml b/components/mobileshell/qml/actiondrawer/private/NotificationDrawer.qml index cd634944..8a367faa 100644 --- a/components/mobileshell/qml/actiondrawer/private/NotificationDrawer.qml +++ b/components/mobileshell/qml/actiondrawer/private/NotificationDrawer.qml @@ -25,6 +25,9 @@ Item { property alias notificationWidget: notificationWidget property real contentY: notificationWidget.listView.contentY + // The sibling toolbar whose height must be subtracted from the available space. + property Item toolButtonsItem: null + property real topPadding: { if (actionDrawer.mode == MobileShell.ActionDrawer.Portrait) return Kirigami.Units.largeSpacing; @@ -42,7 +45,8 @@ Item { property real maximumHeight: -1 height: { - let h = Math.min(actionDrawer.height - toolButtons.height, notificationWidget.listView.contentHeight + 10 + topMargin); + let toolH = toolButtonsItem ? toolButtonsItem.height : 0; + let h = Math.min(actionDrawer.height - toolH, notificationWidget.listView.contentHeight + Kirigami.Units.largeSpacing + topMargin); return maximumHeight > 0 ? Math.min(h, maximumHeight) : h; } diff --git a/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml b/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml index 42c1a588..1ce5b8b8 100644 --- a/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml +++ b/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml @@ -241,10 +241,22 @@ Item { asynchronous: true sourceComponent: PageIndicator { + id: pageIndicatorItem count: swipeView.count currentIndex: swipeView.currentIndex interactive: true - onCurrentIndexChanged: swipeView.currentIndex = currentIndex + onCurrentIndexChanged: { + if (swipeView.currentIndex !== currentIndex) + swipeView.currentIndex = currentIndex; + } + + Connections { + target: swipeView + function onCurrentIndexChanged() { + if (pageIndicatorItem.currentIndex !== swipeView.currentIndex) + pageIndicatorItem.currentIndex = swipeView.currentIndex; + } + } delegate: Rectangle { implicitWidth: 8