Skip to content
Snippets Groups Projects
Commit 664b3ba3 authored by Kali Kaneko's avatar Kali Kaneko
Browse files

center stuff

parent d2b276be
No related branches found
No related tags found
No related merge requests found
import QtQuick 2.9 import QtQuick 2.9
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.0 import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import Qt.labs.platform 1.0 import Qt.labs.platform 1.0
...@@ -9,12 +9,12 @@ import Qt.labs.platform 1.0 ...@@ -9,12 +9,12 @@ import Qt.labs.platform 1.0
Window { Window {
id: app id: app
visible: true visible: true
width: 300 width: 500
height: 600 height: 600
maximumWidth: 300 maximumWidth: 600
minimumWidth: 300 minimumWidth: 300
maximumHeight: 600 maximumHeight: 500
minimumHeight: 600 minimumHeight: 300
flags: Qt.WindowsStaysOnTopHint flags: Qt.WindowsStaysOnTopHint
...@@ -23,32 +23,44 @@ Window { ...@@ -23,32 +23,44 @@ Window {
property var loginDone property var loginDone
property var allowEmptyPass property var allowEmptyPass
GridLayout { TabBar {
id: bar
width: parent.width
TabButton {
text: qsTr("Info")
}
TabButton {
text: qsTr("Gateways")
}
}
visible: true StackLayout {
columns: 3
anchors.fill: parent
currentIndex: bar.currentIndex
Item { Item {
Layout.column: 2
Layout.topMargin: app.height * 0.15
Layout.leftMargin: app.width * 0.10
ColumnLayout { id: infoTab
anchors.centerIn: parent
Column {
Layout.alignment: Qt.AlignHCenter anchors.centerIn: parent
spacing: 5
Text { Text {
id: mainStatus id: mainStatus
text: "off" text: "off"
font.pixelSize: 26 font.pixelSize: 26
Layout.alignment: Text.AlignHCenter anchors.horizontalCenter: parent.horizontalCenter
} }
Text { Text {
id: mainCurrentGateway id: mainCurrentGateway
text: "" text: ""
font.pixelSize: 20 font.pixelSize: 20
Layout.alignment: Text.AlignHCenter anchors.horizontalCenter: parent.horizontalCenter
} }
SwitchDelegate { SwitchDelegate {
...@@ -57,6 +69,7 @@ Window { ...@@ -57,6 +69,7 @@ Window {
text: qsTr("") text: qsTr("")
checked: false checked: false
anchors.horizontalCenter: parent.horizontalCenter
Connections { Connections {
onCheckedChanged: { onCheckedChanged: {
...@@ -104,20 +117,35 @@ Window { ...@@ -104,20 +117,35 @@ Window {
visible: vpntoggle.down || vpntoggle.highlighted visible: vpntoggle.down || vpntoggle.highlighted
color: vpntoggle.down ? "#bdbebf" : "#eeeeee" color: vpntoggle.down ? "#bdbebf" : "#eeeeee"
} }
} } // end switchdelegate
}
}
Item {
id: gatewayTab
anchors.centerIn: parent
Column {
anchors.centerIn: parent
spacing: 10
ComboBox { ComboBox {
id: gwSelector id: gwSelector
editable: false editable: false
anchors.horizontalCenter: parent.horizontalCenter
model: [qsTr("Automatic")] model: [qsTr("Automatic")]
onActivated: { onActivated: {
console.debug("Selected gateway:", currentText) console.debug("Selected gateway:", currentText)
backend.useGateway(currentText.toString()) backend.useGateway(currentText.toString())
} }
} }
} } // end columnlayout
} } // end item
} } // end stacklayout
Connections { Connections {
target: jsonModel target: jsonModel
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment