summaryrefslogtreecommitdiff
path: root/kde-plasma/plasma-desktop/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-23 00:43:56 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-23 00:43:56 +0000
commitbe14af2d51852951dbfea41913a7dd9d1190151e (patch)
tree7db0aeb92a283f51af698d66f3771ffc3b044f6c /kde-plasma/plasma-desktop/files
parent5d09fc9f5630bcabb50afc96e20ff662a0771440 (diff)
gentoo auto-resync : 23:03:2023 - 00:43:55
Diffstat (limited to 'kde-plasma/plasma-desktop/files')
-rw-r--r--kde-plasma/plasma-desktop/files/plasma-desktop-5.27.3-kicker-hide-separators.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/kde-plasma/plasma-desktop/files/plasma-desktop-5.27.3-kicker-hide-separators.patch b/kde-plasma/plasma-desktop/files/plasma-desktop-5.27.3-kicker-hide-separators.patch
new file mode 100644
index 000000000000..30f95a901839
--- /dev/null
+++ b/kde-plasma/plasma-desktop/files/plasma-desktop-5.27.3-kicker-hide-separators.patch
@@ -0,0 +1,77 @@
+From d492a691d44a2878eb3c189219dc04260294bb77 Mon Sep 17 00:00:00 2001
+From: Joshua Goins <josh@redstrate.com>
+Date: Sat, 18 Mar 2023 10:39:49 -0400
+Subject: [PATCH] applets/kicker: Hide separators when sorted alphabetically
+
+Users are able to manually add separator items at custom positions in
+their menu structures. When they do so, the location of these
+separators are inherently custom, and only make sense when the menu
+structure is being displayed in its custom order. When using the option
+to display everything alphabetically, the separators' custom position
+no longer exists and any automatic placement becomes nonsensical.
+
+Currently, the separators get sorted to the beginning of the list,
+which looks quite weird. This commit instead hides the separators when
+sorting alphabetically. Only Kicker is affected by this change; the
+underlying model providing the items is unchanged.
+
+BUG: 465865
+FIXED-IN: 5.27.4
+(cherry picked from commit 90ad64ba638649b68cf2ffb7f68e227e86a8b8f1)
+---
+ applets/kicker/package/contents/ui/ItemListDelegate.qml | 4 +++-
+ applets/kicker/package/contents/ui/ItemListDialog.qml | 2 ++
+ applets/kicker/package/contents/ui/ItemListView.qml | 2 +-
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/applets/kicker/package/contents/ui/ItemListDelegate.qml b/applets/kicker/package/contents/ui/ItemListDelegate.qml
+index 0eefe24e9e..ea7a0455c9 100644
+--- a/applets/kicker/package/contents/ui/ItemListDelegate.qml
++++ b/applets/kicker/package/contents/ui/ItemListDelegate.qml
+@@ -25,6 +25,7 @@ Item {
+
+ readonly property real fullTextWidth: Math.ceil(icon.width + label.implicitWidth + arrow.width + row.anchors.leftMargin + row.anchors.rightMargin + row.actualSpacing)
+ property bool isSeparator: (model.isSeparator === true)
++ property bool sorted: (model.sorted === true)
+ property bool hasChildren: (model.hasChildren === true)
+ property bool hasActionList: ((model.favoriteId !== null)
+ || (("hasActionList" in model) && (model.hasActionList === true)))
+@@ -251,7 +252,8 @@ Item {
+ anchors.rightMargin: highlightItemSvg.margins.right
+ anchors.verticalCenter: parent.verticalCenter
+
+- active: item.isSeparator
++ // Separator positions don't make sense when sorting everything alphabetically
++ active: item.isSeparator && !item.sorted
+
+ asynchronous: false
+ sourceComponent: separatorComponent
+diff --git a/applets/kicker/package/contents/ui/ItemListDialog.qml b/applets/kicker/package/contents/ui/ItemListDialog.qml
+index ffdb2e97c8..d97650cbbe 100644
+--- a/applets/kicker/package/contents/ui/ItemListDialog.qml
++++ b/applets/kicker/package/contents/ui/ItemListDialog.qml
+@@ -70,6 +70,8 @@ Kicker.SubMenu {
+ Kicker.FunnelModel {
+ id: funnelModel
+
++ property bool sorted: sourceModel.hasOwnProperty("sorted") ? sourceModel.sorted : false
++
+ Component.onCompleted: {
+ kicker.reset.connect(funnelModel.reset);
+ }
+diff --git a/applets/kicker/package/contents/ui/ItemListView.qml b/applets/kicker/package/contents/ui/ItemListView.qml
+index 29ff51da05..d931b9fcff 100644
+--- a/applets/kicker/package/contents/ui/ItemListView.qml
++++ b/applets/kicker/package/contents/ui/ItemListView.qml
+@@ -30,7 +30,7 @@ FocusScope {
+ property int itemHeight: Math.ceil((Math.max(theme.mSize(theme.defaultFont).height, PlasmaCore.Units.iconSizes.small)
+ + Math.max(highlightItemSvg.margins.top + highlightItemSvg.margins.bottom,
+ listItemSvg.margins.top + listItemSvg.margins.bottom)) / 2) * 2
+- property int separatorHeight: lineSvg.horLineHeight + (2 * PlasmaCore.Units.smallSpacing)
++ property int separatorHeight: model.sorted === true ? 0 : lineSvg.horLineHeight + (2 * PlasmaCore.Units.smallSpacing)
+
+ property alias currentIndex: listView.currentIndex
+ property alias currentItem: listView.currentItem
+--
+GitLab
+