[PATCH] applets/notifications: improve paddings again
authorNate Graham <nate@kde.org>
Wed, 2 Apr 2025 20:57:09 +0000 (20:57 +0000)
committerPatrick Franz <deltaone@debian.org>
Wed, 2 Apr 2025 23:02:59 +0000 (01:02 +0200)
Zero top padding is fine when there's only a summary label, but looks
bad when there's body text, an icon, or both. Correct that.

(cherry picked from commit 53b6289f84094d91745b79c3bc902e7f80f235ef)

Co-authored-by: Nate Graham <nate@kde.org>
Gbp-Pq: Name improve_paddings.patch

applets/notifications/package/contents/ui/delegates/DelegatePopup.qml

index 2038f49de5097521cc38b2733f7cd9ea3d627d1a..e22a8322196e7cf9fc09007a3a991fa626d8949a 100644 (file)
@@ -93,6 +93,8 @@ BaseDelegate {
 
     Components.Summary {
         id: summary
+        // Base layout intentionally has no row spacing, so add top padding here when needed
+        Layout.topMargin: delegateRoot.hasBodyText || icon.visible ? Kirigami.Units.smallSpacing : 0
         Layout.fillWidth: true
         Layout.row: 2
         Layout.column: delegateRoot.__firstColumn
@@ -108,7 +110,7 @@ BaseDelegate {
 
     Components.Icon {
         id: icon
-        // We removed the row spacing from the base layout, so re-add it just here
+        // Base layout intentionally has no row spacing, so add top padding here
         Layout.topMargin: Kirigami.Units.smallSpacing
         Layout.row: 2
         Layout.column: delegateRoot.__firstColumn + 1