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
This commit is contained in:
parent
b96f23cd3a
commit
e845f3dbcc
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user