mirror of
https://github.com/kbumsik/VirtScreen.git
synced 2025-03-09 15:40:18 +00:00
QML: Completed Systrayicon menu
This commit is contained in:
parent
4ba6598725
commit
fc803cc1af
1 changed files with 48 additions and 4 deletions
52
main.qml
52
main.qml
|
@ -419,6 +419,7 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
id: autoSwitchLayout
|
||||||
anchors.top: vncButton.top
|
anchors.top: vncButton.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: vncButton.height - 10
|
anchors.topMargin: vncButton.height - 10
|
||||||
|
@ -439,11 +440,10 @@ ApplicationWindow {
|
||||||
|
|
||||||
GroupBox {
|
GroupBox {
|
||||||
title: "Available IP addresses"
|
title: "Available IP addresses"
|
||||||
anchors.top: vncButton.top
|
anchors.top: autoSwitchLayout.bottom
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 70
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -452,9 +452,26 @@ ApplicationWindow {
|
||||||
id: ipListView
|
id: ipListView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
// anchors.top: parent.top
|
||||||
|
// anchors.left: parent.left
|
||||||
|
// anchors.right: parent.right
|
||||||
|
// height: 100
|
||||||
|
|
||||||
|
ScrollBar.vertical: ScrollBar {
|
||||||
|
parent: ipListView.parent
|
||||||
|
anchors.top: ipListView.top
|
||||||
|
anchors.right: ipListView.right
|
||||||
|
anchors.bottom: ipListView.bottom
|
||||||
|
policy: ScrollBar.AlwaysOn
|
||||||
|
}
|
||||||
|
|
||||||
model: backend.ipAddresses
|
model: backend.ipAddresses
|
||||||
delegate: Label {
|
delegate: TextEdit {
|
||||||
text: modelData
|
text: modelData
|
||||||
|
readOnly: true
|
||||||
|
selectByMouse: true
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
font.pointSize: 12
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -465,7 +482,9 @@ ApplicationWindow {
|
||||||
// Sytray Icon
|
// Sytray Icon
|
||||||
Labs.SystemTrayIcon {
|
Labs.SystemTrayIcon {
|
||||||
id: sysTrayIcon
|
id: sysTrayIcon
|
||||||
iconSource: "icon/icon.png"
|
iconSource: backend.vncState == Backend.CONNECTED ? "icon/icon_tablet_on.png" :
|
||||||
|
backend.virtScreenCreated ? "icon/icon_tablet_off.png" :
|
||||||
|
"icon/icon.png"
|
||||||
visible: true
|
visible: true
|
||||||
property bool clicked: false
|
property bool clicked: false
|
||||||
|
|
||||||
|
@ -513,6 +532,31 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
menu: Labs.Menu {
|
menu: Labs.Menu {
|
||||||
|
Labs.MenuItem {
|
||||||
|
enabled: false
|
||||||
|
text: vncStateLabel.text
|
||||||
|
}
|
||||||
|
|
||||||
|
Labs.MenuItem {
|
||||||
|
separator: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Labs.MenuItem {
|
||||||
|
text: virtScreenButton.text
|
||||||
|
enabled: virtScreenButton.enabled
|
||||||
|
onTriggered: virtScreenButton.onClicked()
|
||||||
|
}
|
||||||
|
|
||||||
|
Labs.MenuItem {
|
||||||
|
text: vncButton.text
|
||||||
|
enabled: vncButton.enabled
|
||||||
|
onTriggered: vncButton.onClicked()
|
||||||
|
}
|
||||||
|
|
||||||
|
Labs.MenuItem {
|
||||||
|
separator: true
|
||||||
|
}
|
||||||
|
|
||||||
Labs.MenuItem {
|
Labs.MenuItem {
|
||||||
text: qsTr("&Quit")
|
text: qsTr("&Quit")
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue