diff --git a/qml/windowed/AppListView.qml b/qml/windowed/AppListView.qml index 67c0436f..24878853 100644 --- a/qml/windowed/AppListView.qml +++ b/qml/windowed/AppListView.qml @@ -206,6 +206,12 @@ FocusScope { ColorSelector.pressed: false property Palette textColor: DStyle.Style.button.text palette.windowText: ColorSelector.textColor + ColorSelector.hovered: itemHoverHandler.hovered + + HoverHandler { + id: itemHoverHandler + } + ToolTip.text: text ToolTip.delay: 500 ToolTip.visible: hovered && contentItem.implicitWidth > contentItem.width @@ -261,6 +267,8 @@ FocusScope { implicitWidth: DStyle.Style.itemDelegate.width implicitHeight: Helper.windowed.listItemHeight button: itemDelegate + interactionPressed: mouseArea.pressed + interactionHovered: itemHoverHandler.hovered } } Keys.onReturnPressed: { diff --git a/qml/windowed/FreeSortListView.qml b/qml/windowed/FreeSortListView.qml index e03c7c64..3bb6a2a4 100644 --- a/qml/windowed/FreeSortListView.qml +++ b/qml/windowed/FreeSortListView.qml @@ -302,6 +302,11 @@ Item { property Palette textColor: DStyle.Style.button.text palette.windowText: ColorSelector.textColor opacity: !Drag.active && (typeof dndItem === "undefined" || dndItem.currentlyDraggedId !== model.desktopId) ? 1 : 0 + ColorSelector.hovered: itemHoverHandler.hovered + + HoverHandler { + id: itemHoverHandler + } ToolTip.text: text ToolTip.delay: 500 @@ -323,6 +328,8 @@ Item { implicitWidth: DStyle.Style.itemDelegate.width implicitHeight: Helper.windowed.listItemHeight button: itemDelegate + interactionPressed: mouseArea.pressed + interactionHovered: itemHoverHandler.hovered } MouseArea { diff --git a/qml/windowed/ItemBackground.qml b/qml/windowed/ItemBackground.qml index 8d6c5200..a2e0211a 100644 --- a/qml/windowed/ItemBackground.qml +++ b/qml/windowed/ItemBackground.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -12,6 +12,8 @@ D.BoxPanel { id: control property Item button property D.Palette background: Helper.itemBackground + property bool interactionPressed: control.D.ColorSelector.controlState === D.DTK.PressedState + property bool interactionHovered: control.D.ColorSelector.controlState === D.DTK.HoveredState implicitWidth: DS.Style.toolButton.width implicitHeight: DS.Style.toolButton.height @@ -24,7 +26,7 @@ D.BoxPanel { if (typeof dndItem !== "undefined" && dndItem.currentlyDraggedId !== "") { return false } - return button.checked || button.highlighted || button.visualFocus || control.D.ColorSelector.controlState === D.DTK.PressedState || control.D.ColorSelector.controlState === D.DTK.HoveredState + return button.checked || button.highlighted || button.visualFocus || interactionPressed || interactionHovered } function selectValue(normal, checked, highlighted) {