From 41659956e727bbf26d8d0d2fb802d0f6e38b5e0f Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Sat, 25 Nov 2023 19:24:09 +0100 Subject: [PATCH] kcms/rules: Add tooltip when rule name is elided --- src/kcms/rules/ui/RuleItemDelegate.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/kcms/rules/ui/RuleItemDelegate.qml b/src/kcms/rules/ui/RuleItemDelegate.qml index 83d3c2cc15..3873d71678 100644 --- a/src/kcms/rules/ui/RuleItemDelegate.qml +++ b/src/kcms/rules/ui/RuleItemDelegate.qml @@ -37,11 +37,21 @@ QQC2.ItemDelegate { spacing: Kirigami.Units.smallSpacing QQC2.Label { + id: label text: model.name horizontalAlignment: Text.AlignLeft elide: Text.ElideRight Layout.fillWidth: true Layout.alignment: Qt.AlignVCenter + + HoverHandler { + id: labelHover + enabled: label.truncated + } + + QQC2.ToolTip.text: model.name + QQC2.ToolTip.visible: labelHover.hovered + QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay } KCM.ContextualHelpButton {