diff --git a/src/effects/desktopgrid/qml/main.qml b/src/effects/desktopgrid/qml/main.qml index 8d4992b48d..330177a769 100644 --- a/src/effects/desktopgrid/qml/main.qml +++ b/src/effects/desktopgrid/qml/main.qml @@ -154,7 +154,7 @@ Rectangle { id: grid property Item currentItem - readonly property real targetScale: 1 / Math.max(rows, columns) + readonly property real targetScale: Math.min(parent.width / width, parent.height / height) property real panelOpacity: 1 Behavior on x { @@ -186,8 +186,8 @@ Rectangle { } } - width: parent.width * columns - height: parent.height * rows + width: (parent.width + columnSpacing) * columns - columnSpacing + height: (parent.height + rowSpacing) * rows - rowSpacing rowSpacing: PlasmaCore.Units.gridUnit columnSpacing: PlasmaCore.Units.gridUnit rows: container.effect.gridRows