mirror of
https://github.com/kbumsik/VirtScreen.git
synced 2025-02-12 11:21:53 +00:00
QML: Added About dialog
This commit is contained in:
parent
fc803cc1af
commit
05f95f842d
1 changed files with 78 additions and 5 deletions
83
main.qml
83
main.qml
|
@ -21,9 +21,9 @@ ApplicationWindow {
|
||||||
Material.accent: Material.Teal
|
Material.accent: Material.Teal
|
||||||
// Material.background: Material.Grey
|
// Material.background: Material.Grey
|
||||||
|
|
||||||
property int margin: 11
|
property int margin: 8
|
||||||
width: 380
|
width: 380
|
||||||
height: 550
|
height: 525
|
||||||
|
|
||||||
// hide screen when loosing focus
|
// hide screen when loosing focus
|
||||||
property bool autoClose: true
|
property bool autoClose: true
|
||||||
|
@ -115,6 +115,32 @@ ApplicationWindow {
|
||||||
backend.vncState == Backend.CONNECTED ? "Connected." :
|
backend.vncState == Backend.CONNECTED ? "Connected." :
|
||||||
"Server state error!"
|
"Server state error!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ToolButton {
|
||||||
|
id: menuButton
|
||||||
|
anchors.right: parent.right
|
||||||
|
text: qsTr("⋮")
|
||||||
|
onClicked: menu.open()
|
||||||
|
|
||||||
|
Menu {
|
||||||
|
id: menu
|
||||||
|
y: toolbar.height
|
||||||
|
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("&About")
|
||||||
|
onTriggered: {
|
||||||
|
aboutDialog.open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("&Quit")
|
||||||
|
onTriggered: {
|
||||||
|
backend.quitProgram();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,9 +171,8 @@ ApplicationWindow {
|
||||||
id: busyDialog
|
id: busyDialog
|
||||||
modal: true
|
modal: true
|
||||||
closePolicy: Popup.NoAutoClose
|
closePolicy: Popup.NoAutoClose
|
||||||
|
|
||||||
x: (parent.width - width) / 2
|
x: (parent.width - width) / 2
|
||||||
y: (parent.height - height) / 2
|
y: parent.height / 2 - height
|
||||||
|
|
||||||
BusyIndicator {
|
BusyIndicator {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -163,6 +188,55 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Dialog {
|
||||||
|
id: aboutDialog
|
||||||
|
focus: true
|
||||||
|
x: (parent.width - width) / 2
|
||||||
|
y: (parent.width - height) / 2 //(window.height) / 2
|
||||||
|
width: window.width - 26
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
Text {
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
font { weight: Font.Bold; pointSize: 15 }
|
||||||
|
text: "VirtScreen"
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: "Make your iPad/tablet/computer<br/>as a secondary monitor.<br/>"
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: "- <a href='https://github.com/kbumsik/VirtScreen'>Project Website</a>"
|
||||||
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: "- <a href='https://github.com/kbumsik/VirtScreen/issues'>Issues & Bug Report</a>"
|
||||||
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
font { pointSize: 10 }
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
lineHeight: 0.7
|
||||||
|
text: "<br/>Copyright © 2018 Bumsik Kim <a href='https://kbumsik.io/'>Homepage</a><br/>"
|
||||||
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
font { pointSize: 9 }
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: "This program comes with absolutely no warranty.<br/>" +
|
||||||
|
"See the <a href='https://github.com/kbumsik/VirtScreen/blob/master/LICENSE'>" +
|
||||||
|
"GNU General Public License, version 3</a> for details."
|
||||||
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StackLayout {
|
StackLayout {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
anchors.top: tabBar.bottom
|
anchors.top: tabBar.bottom
|
||||||
|
@ -176,7 +250,6 @@ ApplicationWindow {
|
||||||
|
|
||||||
GroupBox {
|
GroupBox {
|
||||||
title: "Virtual Display"
|
title: "Virtual Display"
|
||||||
// font.bold: true
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue