From 0b4a26ada8258f4d25fa5069f239f1041eefecb5 Mon Sep 17 00:00:00 2001
From: Ismael Asensio <isma.af@gmail.com>
Date: Wed, 6 Nov 2024 17:31:17 +0000
Subject: [PATCH] kcm: Fix speaker test layout for Pro-Audio profile

Known audio channels (like 'front-right', `rear-left`) are assigned
rows 0 to 2 in the Grid layout so they are placed in their spatial
position around the user's avatar

Unknown channels (those produced by the Pro Audio pipewire profile)
have no spatial info and are assigned to rows 3 and following

The spacer items were also assigned to row 3, which collided with
those, breaking the layout. Let's give the spacers a high enough
row number so there is no collision with an already occupied cell

BUG: 495752
FIXED-IN: 6.2.4


(cherry picked from commit 36075f9e5f8d58ad2c687b91ec9a9cbef8c59fb3)

Co-authored-by: Ismael Asensio <isma.af@gmail.com>
---
 src/kcm/ui/main.qml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/kcm/ui/main.qml b/src/kcm/ui/main.qml
index dacaec4f..57f60c35 100644
--- a/src/kcm/ui/main.qml
+++ b/src/kcm/ui/main.qml
@@ -468,13 +468,13 @@ KCM.ScrollViewKCM {
 
                 // Spacers for when the left and right columns are empty
                 Item {
-                    Layout.row: 3
+                    Layout.row: 9 // So we don't override an occupied cell
                     Layout.column: 0
                     Layout.fillWidth: true
                     Layout.preferredWidth: Kirigami.Units.gridUnit * 4
                 }
                 Item {
-                    Layout.row: 3
+                    Layout.row: 9 // So we don't override an occupied cell
                     Layout.column: 2
                     Layout.fillWidth: true
                     Layout.preferredWidth: Kirigami.Units.gridUnit * 4
-- 
GitLab

