File 2004-remove-desktop-bar.patch of Package kwin6

diff --git a/src/plugins/overview/qml/main.qml b/src/plugins/overview/qml/main.qml
index 20bedc8eb959b795e8fd69ac51caa8f6f3089e41..ab2323771110f34b19fb11e2d42caaef4421f2b4 100644
--- a/src/plugins/overview/qml/main.qml
+++ b/src/plugins/overview/qml/main.qml
@@ -31,8 +31,6 @@ FocusScope {
     property bool animationEnabled: false
     property bool organized: false
 
-    property bool verticalDesktopBar: KWinComponents.Workspace.desktopGridHeight >= bar.desktopCount && KWinComponents.Workspace.desktopGridHeight != 1
-
     // The values of overviewVal and gridVal might not be 0 on startup,
     // but we always want to animate from 0 to those values. So, we initially
     // always set them to 0 and bind their full values when the effect starts.
@@ -270,43 +268,11 @@ FocusScope {
     }
 
     Item {
-        id: desktopBar
-
-        // (overviewVal, gridVal) represents the state of the overview
-        // in a 2D coordinate plane. Math.atan2 returns the angle between
-        // the x axis and that point. By using this to set the opacity,
-        // we can have an opaque desktopBar when the point moves from
-        // the origin to the "overviewVal" direction, which has angle pi/2,
-        // and a transparent desktopBar when the point moves from
-        // the origin to the "gridVal" direction, which has angle 0,
-        // whilst still animating when the point moves from overviewVal to
-        // gridVal too.
+        id: topBar
         opacity: Math.atan2(overviewVal, gridVal) / Math.PI * 2
-
-        anchors.top: parent.top
         anchors.left: parent.left
-        anchors.right: container.verticalDesktopBar ? undefined : parent.right
-        anchors.bottom: container.verticalDesktopBar ? parent.bottom : undefined
-        height: bar.implicitHeight + 2 * Kirigami.Units.smallSpacing
-        width: bar.implicitWidth + 2 * Kirigami.Units.smallSpacing
-
-        DesktopBar {
-            id: bar
-            anchors.fill: parent
-            windowModel: stackModel
-            desktopModel: desktopModel
-            verticalDesktopBar: container.verticalDesktopBar
-            selectedDesktop: KWinComponents.Workspace.currentDesktop
-            heap: allDesktopHeaps.currentHeap
-        }
-    }
-
-    Item {
-        id: topBar
-        opacity: desktopBar.opacity
-        anchors.left: container.verticalDesktopBar ? desktopBar.right : parent.left
         anchors.right: parent.right
-        anchors.top: container.verticalDesktopBar ? parent.top : desktopBar.bottom
+        anchors.top: parent.top
         anchors.topMargin: Kirigami.Units.largeSpacing
         height: searchField.height + 1 * Kirigami.Units.largeSpacing
 
@@ -337,12 +303,12 @@ FocusScope {
     property var currentGeometry: targetScreen.geometry
 
     // These are the minimum position of maximum size of the desktop preview in the overview
-    property int minX: Kirigami.Units.largeSpacing + (container.verticalDesktopBar ? desktopBar.width : 0)
-    property int minY: Kirigami.Units.largeSpacing + topBar.height + (container.verticalDesktopBar ? 0 : desktopBar.height)
+    property int minX: Kirigami.Units.largeSpacing
+    property int minY: Kirigami.Units.largeSpacing + topBar.height
     property int maxWidth: currentGeometry.width - minX - Kirigami.Units.gridUnit * 2
     property int maxHeight: currentGeometry.height - minY - Kirigami.Units.gridUnit * 2
 
-    property int desktops: Math.max(bar.desktopCount, 2)
+    property int desktops: Math.max(allDesktopHeaps.count, 2)
     property int columns: Math.ceil(desktops / rows)
     property int rows: KWinComponents.Workspace.desktopGridHeight
 
@@ -371,7 +337,7 @@ FocusScope {
             x: Math.round(parent.width / 2) + Math.round(parent.width / 8)
             width: Math.round(parent.width / 2) - Math.round(parent.width / 8) * 2
             anchors.verticalCenter: parent.verticalCenter
-            visible: bar.desktopCount === 1
+            visible: allDesktopHeaps.count === 1
             opacity: gridVal
             spacing: Kirigami.Units.largeSpacing
 
@@ -661,21 +627,6 @@ FocusScope {
                         // fluent animation.
                         gestureInProgress: !Number.isInteger(gridVal) || !Number.isInteger(overviewVal)
 
-                        targetScale: {
-                            if (overviewVal != 1) return targetScale;
-                            let coordinate = container.verticalDesktopBar ? 'x' : 'y'
-                            if (!activeDragHandler.active) {
-                                return targetScale; // leave it alone, so it won't affect transitions before they start
-                            }
-                            var localPressPosition = activeDragHandler.centroid.scenePressPosition[coordinate] - heap.layout.Kirigami.ScenePosition[coordinate];
-                            if (localPressPosition === 0) {
-                                return 0.1;
-                            } else {
-                                var localPosition = activeDragHandler.centroid.scenePosition[coordinate] - heap.layout.Kirigami.ScenePosition[coordinate];
-                                return Math.max(0.1, Math.min(localPosition / localPressPosition, 1));
-                            }
-                        }
-
                         opacity: 1 - downGestureProgress
                         onDownGestureTriggered: window.closeWindow()
                     }
@@ -712,7 +663,7 @@ FocusScope {
     Loader {
         id: searchResults
         active: effect.searchText.length > 0 && (allDesktopHeaps.currentHeap.count === 0 || !effect.filterWindows)
-        anchors.left: container.verticalDesktopBar ? desktopBar.right : parent.left
+        anchors.left: parent.left
         anchors.right: parent.right
         anchors.bottom: parent.bottom
         anchors.top: topBar.bottom
@@ -779,11 +730,6 @@ FocusScope {
     }
 
     Component.onCompleted: {
-        // The following line unbinds the verticalDesktopBar, meaning that it
-        // won't react to changes in number of desktops or rows. This is beacuse we
-        // don't want the desktop bar changing screenside whilst the user is
-        // interacting with it, e.g. by adding desktops
-        container.verticalDesktopBar = container.verticalDesktopBar
         organized = true
     }
 }
openSUSE Build Service is sponsored by