diff options
Diffstat (limited to 'src/scenes/add_server_wizard/Scene_step_1.qml')
-rw-r--r-- | src/scenes/add_server_wizard/Scene_step_1.qml | 105 |
1 files changed, 98 insertions, 7 deletions
diff --git a/src/scenes/add_server_wizard/Scene_step_1.qml b/src/scenes/add_server_wizard/Scene_step_1.qml index a80e4f4..abd761d 100644 --- a/src/scenes/add_server_wizard/Scene_step_1.qml +++ b/src/scenes/add_server_wizard/Scene_step_1.qml @@ -42,11 +42,11 @@ Item { anchors.rightMargin: 15 onClicked: { - add_server_wizard.processStep1(host_url.text) + add_server_wizard.processStep1(host_url.text, host_alias.text) } } - Text { + /*Text { color: Material.foreground id: step_indicator @@ -61,7 +61,7 @@ Item { horizontalAlignment: Text.AlignHCenter anchors.left: parent.left anchors.margins: 5 - } + }*/ Text { color: Material.foreground @@ -74,12 +74,12 @@ Item { "administrator about it please.\nBefore you can "+ "start any remote sessions you will have to "+ "be approved for remote support.") - font.pointSize: 13 + font.pointSize: 12 anchors.right: parent.right anchors.rightMargin: 15 anchors.leftMargin: 15 - anchors.top: step_indicator.bottom - anchors.topMargin: 30 + anchors.top: parent.top //step_indicator.bottom + anchors.topMargin: 15 wrapMode: Text.WordWrap anchors.left: parent.left @@ -160,7 +160,7 @@ Item { Text { color: Material.foreground - text: qsTr("RWA-server address") + text: qsTr("RWA host address") anchors.left: parent.left anchors.leftMargin: 15 anchors.verticalCenterOffset: - host_url.height / 2 @@ -176,6 +176,97 @@ Item { } } } + + TextField { + id: host_alias + selectByMouse: true + placeholderText: qsTr("My example host") + + font.pixelSize: 16 + color: Material.foreground + + padding: 15 + topPadding: 15 + + anchors.top: host_url.bottom + anchors.topMargin: 30 + anchors.left: parent.left + anchors.leftMargin: 15 + anchors.right: parent.right + anchors.margins: 30 + + MouseArea { + anchors.fill: parent + hoverEnabled: true + onHoveredChanged: { + if (containsMouse) { + host_alias_background.state = "hovered" + } else if (!host_alias.focus) { + host_alias_background.state = "unhovered" + } + } + onClicked: { + host_alias.forceActiveFocus(); + } + } + + onFocusChanged: { + host_alias_background.state = host_alias.focus ? "hovered" : "unhovered" + } + + background: Rectangle { + id: host_alias_background + color: Material.background + border.color: Material.foreground + border.width: 1 + radius: 4 + + states: [ + State { + name: "hovered" + PropertyChanges { + target: host_alias_background + border.color: "#0178EF" + } + }, + State { + name: "unhovered" + PropertyChanges { + target: host_alias_background + border.color: Material.foreground + } + } + ] + transitions: [ + Transition { + from: "*" + to: "*" + PropertyAnimation { + property: "border.color" + duration: 100 + easing.type: Easing.Linear + } + } + ] + + Text { + color: Material.foreground + text: qsTr("RWA host alias") + anchors.left: parent.left + anchors.leftMargin: 15 + anchors.verticalCenterOffset: - host_alias.height / 2 + anchors.verticalCenter: parent.verticalCenter + leftPadding: 5 + + Rectangle { + color: Material.background + width: parent.width + 5 + 3 + height: parent.height + z: -1 + } + } + } + } } } |