tray: added contextual menu (widget settings shortcut) on the chevron - when the drawer is enabled

This commit is contained in:
Lemmy
2026-02-06 13:58:56 -05:00
parent fe09dc92f0
commit 2f3e86e5a3
+23 -2
View File
@@ -314,6 +314,27 @@ Item {
border.width: Style.capsuleBorderWidth
}
NPopupContextMenu {
id: chevronContextMenu
model: [
{
"label": I18n.tr("actions.widget-settings"),
"action": "widget-settings",
"icon": "settings"
},
]
onTriggered: action => {
chevronContextMenu.close();
PanelService.closeContextMenu(screen);
if (action === "widget-settings") {
BarService.openWidgetSettings(screen, section, sectionWidgetIndex, widgetId, widgetSettings);
}
}
}
Flow {
id: trayFlow
spacing: 0
@@ -351,7 +372,7 @@ Item {
}
}
onClicked: toggleDrawer(this)
onRightClicked: toggleDrawer(this)
onRightClicked: PanelService.showContextMenu(chevronContextMenu, this, screen)
}
// Pinned items
@@ -547,7 +568,7 @@ Item {
}
}
onClicked: toggleDrawer(this)
onRightClicked: toggleDrawer(this)
onRightClicked: PanelService.showContextMenu(chevronContextMenu, this, screen)
}
} // closes Flow
}