From c914256c9785149244141e63f95f18bf546accb1 Mon Sep 17 00:00:00 2001 From: Toast Date: Sun, 2 Nov 2025 13:43:13 +0100 Subject: [PATCH] Kde/patches: add plasma-desktop patches --- roles/kde/patches/plasma-desktop/patches.txt | 5 + roles/kde/patches/plasma-desktop/pr3256.patch | 94 +++++++++++++++++++ roles/kde/patches/plasma-desktop/pr3259.patch | 78 +++++++++++++++ roles/kde/patches/plasma-desktop/pr3269.patch | 66 +++++++++++++ 4 files changed, 243 insertions(+) create mode 100644 roles/kde/patches/plasma-desktop/patches.txt create mode 100644 roles/kde/patches/plasma-desktop/pr3256.patch create mode 100644 roles/kde/patches/plasma-desktop/pr3259.patch create mode 100644 roles/kde/patches/plasma-desktop/pr3269.patch diff --git a/roles/kde/patches/plasma-desktop/patches.txt b/roles/kde/patches/plasma-desktop/patches.txt new file mode 100644 index 0000000..50ee310 --- /dev/null +++ b/roles/kde/patches/plasma-desktop/patches.txt @@ -0,0 +1,5 @@ +Plasma 6.6.0: + +Pr 3256 https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3256 +Pr 3259 https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3259 +Pr 3269 https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3269 diff --git a/roles/kde/patches/plasma-desktop/pr3256.patch b/roles/kde/patches/plasma-desktop/pr3256.patch new file mode 100644 index 0000000..61d2a0e --- /dev/null +++ b/roles/kde/patches/plasma-desktop/pr3256.patch @@ -0,0 +1,94 @@ +From 79d010f4bcdb19d5a19d222dd3c3cb581fde891d Mon Sep 17 00:00:00 2001 +From: David Redondo +Date: Fri, 17 Oct 2025 15:15:51 +0200 +Subject: [PATCH] applets/taskmanager: Allow changing a tasks volume by + scrolling + +FEATURE:510668 +FIXED-IN:6.6 +--- + .../package/contents/config/main.xml | 1 + + .../package/contents/ui/ConfigBehavior.qml | 3 ++- + .../package/contents/ui/MouseHandler.qml | 20 +++++++++++++++++++ + 3 files changed, 23 insertions(+), 1 deletion(-) + +diff --git a/applets/taskmanager/package/contents/config/main.xml b/applets/taskmanager/package/contents/config/main.xml +index f71a7a8457..8c3b68785b 100644 +--- a/applets/taskmanager/package/contents/config/main.xml ++++ b/applets/taskmanager/package/contents/config/main.xml +@@ -90,6 +90,7 @@ + + + ++ + + 0 + +diff --git a/applets/taskmanager/package/contents/ui/ConfigBehavior.qml b/applets/taskmanager/package/contents/ui/ConfigBehavior.qml +index 2c0dc19154..73357e9dcd 100644 +--- a/applets/taskmanager/package/contents/ui/ConfigBehavior.qml ++++ b/applets/taskmanager/package/contents/ui/ConfigBehavior.qml +@@ -202,13 +202,14 @@ KCMUtils.SimpleKCM { + + QQC2.ComboBox { + id: wheelEnabled +- Kirigami.FormData.label: i18nc("@label:listbox Part of a sentence: 'Scrolling behavior does nothing/cycles through tasks/cycles through the selected task's windows'", "Scrolling behavior:") ++ Kirigami.FormData.label: i18nc("@label:listbox Part of a sentence: 'Scrolling behavior does nothing/cycles through tasks/cycles through the selected task's windows/adjusts the hovered task’s volume''", "Scrolling behavior:") + Layout.fillWidth: true + Layout.minimumWidth: Kirigami.Units.gridUnit * 14 + model: [ + i18nc("@item:inlistbox Part of a sentence: 'Scrolling behavior does nothing'", "Does nothing"), + i18nc("@item:inlistbox Part of a sentence: 'Scrolling behavior cycles through all tasks'", "Cycles through all tasks"), + i18nc("@item:inlistbox Part of a sentence: 'Scrolling behavior cycles through the hovered task's windows'", "Cycles through the hovered task’s windows"), ++ i18nc("@item:inlistbox Part of a sentence: 'Scrolling behavior adjusts the hovered task’s volume'", "Adjusts the hovered task’s volume"), + ] + } + +diff --git a/applets/taskmanager/package/contents/ui/MouseHandler.qml b/applets/taskmanager/package/contents/ui/MouseHandler.qml +index cf2362835a..3f8d703d73 100644 +--- a/applets/taskmanager/package/contents/ui/MouseHandler.qml ++++ b/applets/taskmanager/package/contents/ui/MouseHandler.qml +@@ -8,6 +8,7 @@ import QtQuick + + import org.kde.taskmanager as TaskManager + import org.kde.plasma.plasmoid ++import org.kde.plasma.private.volume as PlasmaPa + + import "code/tools.js" as TaskTools + +@@ -157,6 +158,10 @@ DropArea { + } + } + ++ PlasmaPa.GlobalConfig { ++ id: plasmaPaConfig ++ } ++ + WheelHandler { + id: wheelHandler + +@@ -179,6 +184,21 @@ DropArea { + increment--; + } + const anchor = dropArea.target.childAt(event.x, event.y); ++ if (Plasmoid.configuration.wheelEnabled === 3) { ++ const loudest = anchor?.audioStreams?.reduce((loudest, stream) => Math.max(loudest, stream.volume), 0) ++ const step = (pulseAudio.item.normalVolume - pulseAudio.item.minimalVolume) * plasmaPaConfig.volumeStep / 100; ++ anchor?.audioStreams?.forEach((stream) => { ++ let delta = step * increment; ++ if (loudest > 0) { ++ delta *= stream.volume / loudest; ++ } ++ const volume = stream.volume + delta; ++ console.log(volume, Math.max(pulseAudio.item.minimalVolume, Math.min(volume, pulseAudio.item.normalVolume))); ++ stream.model.Volume = Math.max(pulseAudio.item.minimalVolume, Math.min(volume, pulseAudio.item.normalVolume)); ++ stream.model.Muted = volume === 0 ++ }) ++ return; ++ } + while (increment !== 0) { + TaskTools.activateNextPrevTask(anchor, increment < 0, Plasmoid.configuration.wheelSkipMinimized, Plasmoid.configuration.wheelEnabled, tasks); + increment += (increment < 0) ? 1 : -1; +-- +GitLab + diff --git a/roles/kde/patches/plasma-desktop/pr3259.patch b/roles/kde/patches/plasma-desktop/pr3259.patch new file mode 100644 index 0000000..8104e45 --- /dev/null +++ b/roles/kde/patches/plasma-desktop/pr3259.patch @@ -0,0 +1,78 @@ +From 57885ba4ec524bdc1c1326228f27c1c3a3561bba Mon Sep 17 00:00:00 2001 +From: Nate Graham +Date: Tue, 21 Oct 2025 13:39:40 -0600 +Subject: [PATCH] applets/kickoff: add spacing between non-switch-on-hover + category items + +Otherwise, their highlight effects touch, and it looks bad. + +To avoid blowing up the layout as a result of this change, slightly +decrease the height of these category list items too, which also reduces +some code complexity. + +BUG: 508985 +FIXED-IN: 6.6.0 +--- + applets/kickoff/ApplicationsPage.qml | 1 + + applets/kickoff/KickoffListDelegate.qml | 9 --------- + applets/kickoff/KickoffListView.qml | 5 +++++ + 3 files changed, 6 insertions(+), 9 deletions(-) + +diff --git a/applets/kickoff/ApplicationsPage.qml b/applets/kickoff/ApplicationsPage.qml +index c2baa75b52..fe8d6eaafb 100644 +--- a/applets/kickoff/ApplicationsPage.qml ++++ b/applets/kickoff/ApplicationsPage.qml +@@ -20,6 +20,7 @@ BasePage { + id: sideBar + focus: true // needed for Loaders + model: kickoff.rootModel ++ showingCategories: true + // needed otherwise app displayed at top-level will show a first character as group. + section.property: "" + delegate: KickoffListDelegate { +diff --git a/applets/kickoff/KickoffListDelegate.qml b/applets/kickoff/KickoffListDelegate.qml +index b1f8afb3ce..02bfcfcacd 100644 +--- a/applets/kickoff/KickoffListDelegate.qml ++++ b/applets/kickoff/KickoffListDelegate.qml +@@ -72,15 +72,6 @@ AbstractKickoffItemDelegate { + id: label + Layout.fillWidth: !descriptionLabel.visible + Layout.maximumWidth: root.width - root.leftPadding - root.rightPadding - icon.width - row.spacing +- Layout.preferredHeight: { +- if (root.isCategoryListItem) { +- return root.compact ? implicitHeight : Math.round(implicitHeight * 1.5); +- } +- if (!root.compact && !descriptionLabel.visible) { +- return implicitHeight + descriptionLabel.implicitHeight +- } +- return implicitHeight; +- } + text: root.text + textFormat: root.isMultilineText ? Text.StyledText : Text.PlainText + elide: Text.ElideRight +diff --git a/applets/kickoff/KickoffListView.qml b/applets/kickoff/KickoffListView.qml +index c7787493e0..382d146428 100644 +--- a/applets/kickoff/KickoffListView.qml ++++ b/applets/kickoff/KickoffListView.qml +@@ -33,6 +33,7 @@ EmptyPage { + property alias section: view.section + property alias highlight: view.highlight + property alias view: view ++ property bool showingCategories: false + + property bool mainContentView: false + property bool hasSectionView: false +@@ -144,6 +145,10 @@ EmptyPage { + width: view.availableWidth + } + ++ // Without switch-on-hover, it's possible for the selected category and the hovered category to be adjacent. ++ // When this happens, their highlights tuoch and look ungly without some artificial spacing added. ++ spacing: root.showingCategories && !Plasmoid.configuration.switchCategoryOnHover ? Kirigami.Units.smallSpacing : 0 ++ + section { + property: "group" + criteria: ViewSection.FullString +-- +GitLab + diff --git a/roles/kde/patches/plasma-desktop/pr3269.patch b/roles/kde/patches/plasma-desktop/pr3269.patch new file mode 100644 index 0000000..3a53322 --- /dev/null +++ b/roles/kde/patches/plasma-desktop/pr3269.patch @@ -0,0 +1,66 @@ +From a63fce38f285b59407c24f44639023d41b5d3ca9 Mon Sep 17 00:00:00 2001 +From: Nate Graham +Date: Thu, 30 Oct 2025 20:01:32 -0600 +Subject: [PATCH] applets/kickoff: add separation between Places page list + items too + +Missed in 57885ba4ec524bdc1c1326228f27c1c3a3561bba + +BUG: 508985 +FIXED-IN: 6.6.0 +--- + applets/kickoff/ApplicationsPage.qml | 2 +- + applets/kickoff/KickoffListView.qml | 4 ++-- + applets/kickoff/PlacesPage.qml | 1 + + 3 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/applets/kickoff/ApplicationsPage.qml b/applets/kickoff/ApplicationsPage.qml +index fe8d6eaafb..206ddd958d 100644 +--- a/applets/kickoff/ApplicationsPage.qml ++++ b/applets/kickoff/ApplicationsPage.qml +@@ -20,7 +20,7 @@ BasePage { + id: sideBar + focus: true // needed for Loaders + model: kickoff.rootModel +- showingCategories: true ++ isSidebar: true + // needed otherwise app displayed at top-level will show a first character as group. + section.property: "" + delegate: KickoffListDelegate { +diff --git a/applets/kickoff/KickoffListView.qml b/applets/kickoff/KickoffListView.qml +index 382d146428..2d67bd59b7 100644 +--- a/applets/kickoff/KickoffListView.qml ++++ b/applets/kickoff/KickoffListView.qml +@@ -33,7 +33,7 @@ EmptyPage { + property alias section: view.section + property alias highlight: view.highlight + property alias view: view +- property bool showingCategories: false ++ property bool isSidebar: false + + property bool mainContentView: false + property bool hasSectionView: false +@@ -147,7 +147,7 @@ EmptyPage { + + // Without switch-on-hover, it's possible for the selected category and the hovered category to be adjacent. + // When this happens, their highlights tuoch and look ungly without some artificial spacing added. +- spacing: root.showingCategories && !Plasmoid.configuration.switchCategoryOnHover ? Kirigami.Units.smallSpacing : 0 ++ spacing: root.isSidebar && !Plasmoid.configuration.switchCategoryOnHover ? Kirigami.Units.smallSpacing : 0 + + section { + property: "group" +diff --git a/applets/kickoff/PlacesPage.qml b/applets/kickoff/PlacesPage.qml +index ff92f535e4..7f81096834 100644 +--- a/applets/kickoff/PlacesPage.qml ++++ b/applets/kickoff/PlacesPage.qml +@@ -19,6 +19,7 @@ BasePage { + id: sideBar + focus: true // needed for Loaders + model: placesCategoryModel ++ isSidebar: true + delegate: KickoffListDelegate { + url: "" + description: "" +-- +GitLab +