diff --git a/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml b/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml index 54183d06..5128afc7 100644 --- a/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml +++ b/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml @@ -173,7 +173,7 @@ PlasmaCore.ColorScope { // right sidebar QuickSettingsPanel { id: quickSettings - height: Math.min(root.height, Math.max(quickSettings.minimizedHeight, actionDrawer.offset)) + height: quickSettings.contentImplicitHeight + quickSettings.topPadding + quickSettings.bottomPadding width: intendedWidth readonly property real intendedWidth: 360 @@ -182,11 +182,12 @@ PlasmaCore.ColorScope { anchors.right: parent.right actionDrawer: root.actionDrawer - fullHeight: root.height + fullScreenHeight: root.height transform: Translate { id: translate - y: Math.min(root.actionDrawer.offset - quickSettings.minimizedHeight, 0) + property real offsetRatio: quickSettings.height / root.height + y: Math.min(root.actionDrawer.offset * offsetRatio - quickSettings.height, 0) } } } diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml index a06f2607..47aa4aa9 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml @@ -48,9 +48,18 @@ Item { readonly property int rowCount: { let totalRows = Math.ceil(quickSettingsCount / columnCount); let isPortrait = MobileShellState.Shell.orientation === MobileShellState.Shell.Portrait; - let maxRows = 5; // more than 5 is just disorienting - let targetRows = Math.floor(Window.height * (isPortrait ? 0.65 : 0.8) / rowHeight); - return Math.min(maxRows, Math.min(totalRows, targetRows)); + + if (isPortrait) { + // portrait orientation + let maxRows = 5; // more than 5 is just disorienting + let targetRows = Math.floor(Window.height * 0.65 / rowHeight); + return Math.min(maxRows, Math.min(totalRows, targetRows)); + + } else { + // horizontal orientation + let targetRows = Math.floor(Window.height * 0.8 / rowHeight); + return Math.min(totalRows, targetRows); + } } readonly property int pageSize: rowCount * columnCount diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml index 6d3755ae..94e1f667 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml @@ -28,12 +28,7 @@ Components.BaseItem { required property var actionDrawer - required property real fullHeight - - /** - * Height of panel when first pulled down. - */ - readonly property real minimizedHeight: bottomPadding + topPadding + statusBar.height + quickSettings.rowHeight + required property real fullScreenHeight /** * Implicit height of the contents of the panel. @@ -53,7 +48,6 @@ Components.BaseItem { contentItem: Item { id: containerItem - clip: true // use container item so that our column doesn't get stretched if base item is anchored ColumnLayout { @@ -61,7 +55,7 @@ Components.BaseItem { anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top - height: root.fullHeight + height: root.fullScreenHeight spacing: 0 StatusBar.StatusBar { @@ -89,7 +83,7 @@ Components.BaseItem { Layout.alignment: Qt.AlignTop Layout.fillWidth: true - Layout.maximumHeight: root.fullHeight - root.topPadding - root.bottomPadding - statusBar.height - PlasmaCore.Units.smallSpacing + Layout.maximumHeight: root.fullScreenHeight - root.topPadding - root.bottomPadding - statusBar.height - PlasmaCore.Units.smallSpacing Layout.maximumWidth: column.width actionDrawer: root.actionDrawer