From e845f3dbcc2b0495d557d0be6eced7e0722770a8 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Wed, 4 Nov 2020 13:32:08 -0700 Subject: [PATCH] Always show ExpandableListitem buttons, not just on hover Hover buttons suffer from discoverability problems and can't be used on touch, and this component is explicitly trying to be touch-friendly. So let's make the buttons always be visible, not just on hover. To avoid the appearance becoming too heavy, the Buttons are turned into ToolButtons. BUG: 428624 FIXED-IN: 5.76 --- .../plasmaextracomponents/qml/ExpandableListItem.qml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/declarativeimports/plasmaextracomponents/qml/ExpandableListItem.qml b/src/declarativeimports/plasmaextracomponents/qml/ExpandableListItem.qml index 191ca4a21..48bc80549 100644 --- a/src/declarativeimports/plasmaextracomponents/qml/ExpandableListItem.qml +++ b/src/declarativeimports/plasmaextracomponents/qml/ExpandableListItem.qml @@ -328,10 +328,8 @@ Item { } } - // We still need a MouseArea to handle mouse hover and right-click + // We still need a MouseArea to handle right-click MouseArea { - id: clickAndHoverHandler - anchors.fill: parent enabled: listItem.isEnabled @@ -448,20 +446,17 @@ Item { } // Default action button - PlasmaComponents3.Button { + PlasmaComponents3.ToolButton { id: defaultActionButton enabled: listItem.isEnabled visible: defaultActionButtonAction && listItem.defaultActionButtonVisible - && (clickAndHoverHandler.containsMouse || expandedView.active) && (!busyIndicator.visible || listItem.showDefaultActionButtonWhenBusy) } // Expand/collapse button - PlasmaComponents3.Button { - visible: clickAndHoverHandler.containsMouse || expandedView.visible - + PlasmaComponents3.ToolButton { icon.name: expandedView.active? "collapse" : "expand" onClicked: listItem.toggleExpanded()