From 3aa1411d948f2ee43f99323007e7e776ce9e99f5 Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Fri, 16 Sep 2022 20:46:02 +0300 Subject: [PATCH] effects/desktopgrid: Fix background highlight having extra size Without window title being shown, background highlight should shrink as well, otherwise it created a questionable gap at the bottom e.g. in a Desktop Grid effect. FIXED-IN: 5.26 --- src/effects/private/qml/WindowHeapDelegate.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/effects/private/qml/WindowHeapDelegate.qml b/src/effects/private/qml/WindowHeapDelegate.qml index 96b7fd930e..cfdf5eba0c 100644 --- a/src/effects/private/qml/WindowHeapDelegate.qml +++ b/src/effects/private/qml/WindowHeapDelegate.qml @@ -130,7 +130,7 @@ Item { topMargin: -PlasmaCore.Units.smallSpacing * 2 leftMargin: -PlasmaCore.Units.smallSpacing * 2 rightMargin: -PlasmaCore.Units.smallSpacing * 2 - bottomMargin: -(Math.round(icon.height / 4) + caption.height + (PlasmaCore.Units.smallSpacing * 2)) + bottomMargin: -(Math.round(icon.height / 4) + (thumb.windowTitleVisible ? caption.height : 0) + (PlasmaCore.Units.smallSpacing * 2)) } imagePath: "widgets/viewitem" prefix: "hover" @@ -157,12 +157,12 @@ Item { PlasmaCore.IconItem { id: icon width: PlasmaCore.Units.iconSizes.large - height: width + height: PlasmaCore.Units.iconSizes.large source: thumb.client.icon usesPlasmaTheme: false anchors.horizontalCenter: thumbSource.horizontalCenter anchors.bottom: thumbSource.bottom - anchors.bottomMargin: -height / 4 + anchors.bottomMargin: -Math.round(height / 4) visible: !thumb.activeHidden && !activeDragHandler.active PC3.Label { @@ -187,7 +187,7 @@ Item { naturalWidth: thumb.client.width naturalHeight: thumb.client.height persistentKey: thumb.client.internalId - bottomMargin: icon.height / 4 + caption.height + bottomMargin: icon.height / 4 + (thumb.windowTitleVisible ? caption.height : 0) } states: [