From fe9f66496337fe8d77cb177fe223261140f4baa5 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Wed, 14 Sep 2022 14:40:58 -0600 Subject: [PATCH] wallpapers/slideshowpackage: fix tooltip so it actually appears We had disabled hover on the list item, so it would never become visible. In addition, its visibility condition was wrong as we only want it to become visible for list items that have elided text. BUG: 459052 FIXED-IN: 5.26 --- .../slideshowpackage/contents/ui/SlideshowComponent.qml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wallpapers/image/slideshowpackage/contents/ui/SlideshowComponent.qml b/wallpapers/image/slideshowpackage/contents/ui/SlideshowComponent.qml index 7ef9f4500..bc3c07653 100644 --- a/wallpapers/image/slideshowpackage/contents/ui/SlideshowComponent.qml +++ b/wallpapers/image/slideshowpackage/contents/ui/SlideshowComponent.qml @@ -191,8 +191,11 @@ ColumnLayout { hoverEnabled: false contentItem: Kirigami.BasicListItem { width: slidePathsView.width - baseListItem.overlayWidth - // Don't need a highlight or hover effects - hoverEnabled: false + // Don't want a background highlight effect, but we can't just + // set hoverEnabled to false, since then the tooltip will + // never appear! + activeBackgroundColor: "transparent" + activeTextColor: Kirigami.Theme.textColor separatorVisible: false // Header: the folder @@ -207,7 +210,7 @@ ColumnLayout { } QQC2.ToolTip.text: modelData - QQC2.ToolTip.visible: hovered + QQC2.ToolTip.visible: hovered && (labelItem.truncated || subtitleItem.truncated) QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay }