From 4320789a049cf5cc0c66ac2c434f1d9b68ee2f2f Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Fri, 23 Jul 2021 20:40:41 +0200 Subject: [PATCH] [DeviceDelegate] Improve interaction with overflow menu * Right-align relative to menu button * Highlight button while menu is open * Open on press rather than on click like a toolbar menu --- plasmoid/package/contents/ui/DeviceDelegate.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plasmoid/package/contents/ui/DeviceDelegate.qml b/plasmoid/package/contents/ui/DeviceDelegate.qml index 056ac47a9..73ced4526 100644 --- a/plasmoid/package/contents/ui/DeviceDelegate.qml +++ b/plasmoid/package/contents/ui/DeviceDelegate.qml @@ -128,13 +128,14 @@ PlasmaComponents.ListItem PlasmaComponents3.ToolButton { id: overflowMenu icon.name: "application-menu" + checked: menu.status === PlasmaComponents.DialogStatus.Open - onClicked: { - menu.open(overflowMenu, overflowMenu.height) - } + onPressed: menu.openRelative() PlasmaComponents.ContextMenu { id: menu + visualParent: overflowMenu + placement: PlasmaCore.Types.BottomPosedLeftAlignedPopup //Share PlasmaComponents.MenuItem