78 lines
3.3 KiB
Diff
78 lines
3.3 KiB
Diff
From 57885ba4ec524bdc1c1326228f27c1c3a3561bba Mon Sep 17 00:00:00 2001
|
|
From: Nate Graham <nate@kde.org>
|
|
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
|
|
|