Some fixes in the connection setup wizard
This commit is contained in:
parent
bfb874c2c8
commit
5d23a92dd0
@ -37,7 +37,7 @@ Page {
|
|||||||
id: titleLabel
|
id: titleLabel
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: root.title
|
text: root.title
|
||||||
font: Style.largeFont
|
font: Style.bigFont
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
|||||||
@ -73,8 +73,13 @@ WizardPageBase {
|
|||||||
onBack: pageStack.pop()
|
onBack: pageStack.pop()
|
||||||
|
|
||||||
content: ColumnLayout {
|
content: ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors {
|
||||||
anchors.margins: Style.margins
|
top: parent.top;
|
||||||
|
bottom: parent.bottom;
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
margins: Style.margins
|
||||||
|
}
|
||||||
|
width: Math.min(500, parent.width)
|
||||||
|
|
||||||
BigTile {
|
BigTile {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@ -132,6 +137,7 @@ WizardPageBase {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.margins: Style.smallMargins
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: qsTr("If your nymea system is already connected to the network you can skip this step.")
|
text: qsTr("If your nymea system is already connected to the network you can skip this step.")
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
horizontalAlignment: Qt.AlignHCenter
|
||||||
@ -152,7 +158,12 @@ WizardPageBase {
|
|||||||
onBack: pageStack.pop()
|
onBack: pageStack.pop()
|
||||||
|
|
||||||
content: ColumnLayout {
|
content: ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
bottom: parent.bottom
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
width: Math.min(500, parent.width)
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@ -303,8 +314,12 @@ WizardPageBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
content: ColumnLayout {
|
content: ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors {
|
||||||
anchors.margins: Style.margins
|
top: parent.top
|
||||||
|
bottom: parent.bottom
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
width: Math.min(500, parent.width - Style.margins * 2)
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: 2
|
columns: 2
|
||||||
|
|
||||||
@ -356,18 +371,12 @@ WizardPageBase {
|
|||||||
onNext: pageStack.push(selectInstanceComponent)
|
onNext: pageStack.push(selectInstanceComponent)
|
||||||
onBack: pageStack.pop()
|
onBack: pageStack.pop()
|
||||||
|
|
||||||
content: ColumnLayout {
|
content: Image {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Style.margins
|
anchors.margins: Style.margins
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
sourceSize.width: width
|
||||||
Image {
|
source: "/ui/images/setupwizard/wired-connection.svg"
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.leftMargin: Style.bigMargins
|
|
||||||
Layout.rightMargin: Style.bigMargins
|
|
||||||
Layout.preferredHeight: width * sourceSize.height / sourceSize.width
|
|
||||||
source: "/ui/images/setupwizard/wired-connection.svg"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -381,18 +390,12 @@ WizardPageBase {
|
|||||||
onNext: pageStack.push(wirelessBluetoothDiscoveryComponent)
|
onNext: pageStack.push(wirelessBluetoothDiscoveryComponent)
|
||||||
onBack: pageStack.pop()
|
onBack: pageStack.pop()
|
||||||
|
|
||||||
content: ColumnLayout {
|
content: Image {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Style.margins
|
anchors.margins: Style.margins
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
sourceSize.width: width
|
||||||
Image {
|
source: "/ui/images/setupwizard/wireless-connection.svg"
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.leftMargin: Style.bigMargins
|
|
||||||
Layout.rightMargin: Style.bigMargins
|
|
||||||
Layout.preferredHeight: width * sourceSize.height / sourceSize.width
|
|
||||||
source: "/ui/images/setupwizard/wireless-connection.svg"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -455,7 +458,13 @@ WizardPageBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
content: ListView {
|
content: ListView {
|
||||||
anchors.fill: parent
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
bottom: parent.bottom
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
width: Math.min(500, parent.width)
|
||||||
|
|
||||||
model: BluetoothDeviceInfosProxy {
|
model: BluetoothDeviceInfosProxy {
|
||||||
id: deviceInfosProxy
|
id: deviceInfosProxy
|
||||||
model: bluetoothDiscovery.deviceInfos
|
model: bluetoothDiscovery.deviceInfos
|
||||||
@ -480,6 +489,30 @@ WizardPageBase {
|
|||||||
pageStack.push(wirelessBluetoothConnectingComponent)
|
pageStack.push(wirelessBluetoothConnectingComponent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
width: parent.width - Style.margins * 2
|
||||||
|
anchors.centerIn: parent
|
||||||
|
spacing: Style.bigMargins
|
||||||
|
visible: !bluetoothDiscovery.bluetoothAvailable || !bluetoothDiscovery.bluetoothEnabled
|
||||||
|
|
||||||
|
ColorIcon {
|
||||||
|
name: "/ui/images/connections/bluetooth.svg"
|
||||||
|
size: Style.iconSize * 5
|
||||||
|
color: !bluetoothDiscovery.bluetoothAvailable ? Style.red : Style.gray
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
text: !bluetoothDiscovery.bluetoothAvailable
|
||||||
|
? qsTr("Bluetooth doesn't seem to be available on this system.")
|
||||||
|
: qsTr("Bluetooth is turned off. Please enable Bluetooth on this device.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -507,7 +540,13 @@ WizardPageBase {
|
|||||||
property var wifiSetup: null
|
property var wifiSetup: null
|
||||||
|
|
||||||
content: ListView {
|
content: ListView {
|
||||||
anchors.fill: parent
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
bottom: parent.bottom
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
width: Math.min(500, parent.width)
|
||||||
|
|
||||||
model: wifiSetup.accessPoints
|
model: wifiSetup.accessPoints
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
@ -580,7 +619,7 @@ WizardPageBase {
|
|||||||
|
|
||||||
content: ColumnLayout {
|
content: ColumnLayout {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: parent.width - Style.margins * 2
|
width: Math.min(500, parent.width - Style.margins * 2)
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@ -670,7 +709,7 @@ WizardPageBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
content: ColumnLayout {
|
content: ColumnLayout {
|
||||||
width: parent.width - Style.margins * 2
|
width: Math.min(500, parent.width - Style.margins * 2)
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: Style.margins
|
spacing: Style.margins
|
||||||
Label {
|
Label {
|
||||||
|
|||||||
Reference in New Issue
Block a user