diff --git a/src/effects/overview/expolayout.cpp b/src/effects/overview/expolayout.cpp index a00ba2a8d4..5f843a4e33 100644 --- a/src/effects/overview/expolayout.cpp +++ b/src/effects/overview/expolayout.cpp @@ -687,13 +687,13 @@ void ExpoLayout::calculateWindowTransformationsNatural() if (bounds == area) { scale = 1.0; // Don't add borders to the screen } else if (area.width() / qreal(bounds.width()) < area.height() / qreal(bounds.height())) { - scale = (area.width() - 2 * m_spacing) / qreal(bounds.width()); + scale = area.width() / qreal(bounds.width()); } else { - scale = (area.height() - 2 * m_spacing) / qreal(bounds.height()); + scale = area.height() / qreal(bounds.height()); } // Make bounding rect fill the screen size for later steps - bounds = QRect((bounds.x() * scale - (area.width() - 2 * m_spacing - bounds.width() * scale) / 2 - m_spacing) / scale, - (bounds.y() * scale - (area.height() - 2 * m_spacing - bounds.height() * scale) / 2 - m_spacing) / scale, + bounds = QRect(bounds.x() - (area.width() / scale - bounds.width()) / 2, + bounds.y() - (area.height() / scale - bounds.height()) / 2, area.width() / scale, area.height() / scale); @@ -711,7 +711,7 @@ void ExpoLayout::calculateWindowTransformationsNatural() if (m_fillGaps) { // Don't expand onto or over the border QRegion borderRegion(area.adjusted(-200, -200, 200, 200)); - borderRegion ^= area.adjusted(m_spacing / scale, m_spacing / scale, -m_spacing / scale, -m_spacing / scale); + borderRegion ^= area; bool moved; do { diff --git a/src/effects/overview/qml/ScreenView.qml b/src/effects/overview/qml/ScreenView.qml index 6ec971df82..77832123a6 100644 --- a/src/effects/overview/qml/ScreenView.qml +++ b/src/effects/overview/qml/ScreenView.qml @@ -85,6 +85,7 @@ FocusScope { y: heapArea.y width: heapArea.width height: heapArea.height + padding: PlasmaCore.Units.largeSpacing focus: true animationEnabled: container.animationEnabled organized: container.organized diff --git a/src/effects/overview/qml/WindowHeap.qml b/src/effects/overview/qml/WindowHeap.qml index 4b56241326..849c3974e3 100644 --- a/src/effects/overview/qml/WindowHeap.qml +++ b/src/effects/overview/qml/WindowHeap.qml @@ -24,12 +24,16 @@ FocusScope { property alias model: windowsRepeater.model property int selectedIndex: -1 property bool animationEnabled: false + property real padding: 0 required property bool organized ExpoLayout { id: expoLayout - anchors.fill: parent + x: heap.padding + y: heap.padding + width: parent.width - 2 * heap.padding + height: parent.height - 2 * heap.padding mode: effect.layout focus: true spacing: PlasmaCore.Units.largeSpacing