Skip to content

Commit a1aae8d

Browse files
committed
feat: add right-click context menu to systray window
Fixes: #8936
1 parent b63c708 commit a1aae8d

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

src/gui/tray/MainWindow.qml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ ApplicationWindow {
250250
MouseArea {
251251
anchors.fill: parent
252252
onClicked: forceActiveFocus()
253+
onPressed: (mouse) => {
254+
if (mouse.button === Qt.RightButton) {
255+
trayContextMenu.popup()
256+
}
257+
}
253258
}
254259

255260
TrayWindowHeader {
@@ -893,5 +898,18 @@ ApplicationWindow {
893898
}
894899
}
895900
}
901+
902+
Menu {
903+
id: trayContextMenu
904+
905+
MenuItem {
906+
text: qsTr("Open Nextcloud Folder")
907+
onClicked: console.log("Open Nextcloud Folder clicked") // Placeholder
908+
}
909+
MenuItem {
910+
text: qsTr("Open Nextcloud in File Explorer")
911+
onClicked: console.log("Open Nextcloud in File Explorer clicked") // Placeholder
912+
}
913+
}
896914
} // Item trayWindowMainItem
897915
}

0 commit comments

Comments
 (0)