mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-02 15:55:39 +00:00
Add a PC menu header to show the current PC status
This commit is contained in:
parent
a6551c320d
commit
19d5358b97
@ -3,6 +3,13 @@ import QtQuick.Controls 2.2
|
|||||||
|
|
||||||
Menu {
|
Menu {
|
||||||
onOpened: {
|
onOpened: {
|
||||||
itemAt(0).forceActiveFocus(Qt.TabFocusReason)
|
// Give focus to the first visible and enabled menu item
|
||||||
|
for (var i = 0; i < count; i++) {
|
||||||
|
var item = itemAt(i)
|
||||||
|
if (item.visible && item.enabled) {
|
||||||
|
item.forceActiveFocus(Qt.TabFocusReason)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -162,6 +162,11 @@ CenteredGridView {
|
|||||||
|
|
||||||
NavigableMenu {
|
NavigableMenu {
|
||||||
id: pcContextMenu
|
id: pcContextMenu
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("PC Status: %1").arg(model.online ? qsTr("Online") : qsTr("Offline"))
|
||||||
|
font.bold: true
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
NavigableMenuItem {
|
NavigableMenuItem {
|
||||||
parentMenu: pcContextMenu
|
parentMenu: pcContextMenu
|
||||||
text: qsTr("View All Apps")
|
text: qsTr("View All Apps")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user