QML ui fixes
This commit is contained in:
parent
377bac67be
commit
ca233be127
6 changed files with 87 additions and 65 deletions
|
@ -1,10 +1,33 @@
|
||||||
ImageButtonType {
|
import QtQuick 2.12
|
||||||
|
import QtQuick.Controls 2.12
|
||||||
|
|
||||||
|
Button {
|
||||||
|
id: root
|
||||||
x: 10
|
x: 10
|
||||||
y: 10
|
y: 5
|
||||||
width: 26
|
width: 41
|
||||||
height: 20
|
height: 35
|
||||||
icon.source: "qrc:/images/arrow_left.png"
|
|
||||||
|
hoverEnabled: true
|
||||||
|
property bool containsMouse: hovered
|
||||||
|
|
||||||
|
background: Item {}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: mouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
enabled: false
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
UiLogic.closePage()
|
UiLogic.closePage()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
contentItem: Image {
|
||||||
|
id: img
|
||||||
|
source: "qrc:/images/arrow_left.png"
|
||||||
|
anchors.fill: root
|
||||||
|
anchors.margins: root.containsMouse ? 9 : 10
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,5 @@ import QtQuick.Controls 2.12
|
||||||
Image {
|
Image {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.bottomMargin: 30
|
anchors.bottomMargin: 30
|
||||||
// width: GC.trW(150)
|
|
||||||
// height: GC.trH(22)
|
|
||||||
// y: GC.trY(590)
|
|
||||||
source: "qrc:/images/AmneziaVPN.png"
|
source: "qrc:/images/AmneziaVPN.png"
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,13 +52,6 @@ PageBase {
|
||||||
AppSettingsLogic.onCheckBoxStartMinimizedToggled(checked)
|
AppSettingsLogic.onCheckBoxStartMinimizedToggled(checked)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Image {
|
|
||||||
anchors.horizontalCenter: root.horizontalCenter
|
|
||||||
width: GC.trW(150)
|
|
||||||
height: GC.trH(22)
|
|
||||||
y: GC.trY(590)
|
|
||||||
source: "qrc:/images/AmneziaVPN.png"
|
|
||||||
}
|
|
||||||
LabelType {
|
LabelType {
|
||||||
x: 30
|
x: 30
|
||||||
y: 240
|
y: 240
|
||||||
|
@ -69,7 +62,8 @@ PageBase {
|
||||||
BlueButtonType {
|
BlueButtonType {
|
||||||
x: 30
|
x: 30
|
||||||
y: 280
|
y: 280
|
||||||
width: 321
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
width: parent.width - 40
|
||||||
height: 41
|
height: 41
|
||||||
text: qsTr("Check for updates")
|
text: qsTr("Check for updates")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -79,11 +73,16 @@ PageBase {
|
||||||
BlueButtonType {
|
BlueButtonType {
|
||||||
x: 30
|
x: 30
|
||||||
y: 340
|
y: 340
|
||||||
width: 321
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
width: parent.width - 40
|
||||||
height: 41
|
height: 41
|
||||||
text: qsTr("Open logs folder")
|
text: qsTr("Open logs folder")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
AppSettingsLogic.onPushButtonOpenLogsClicked()
|
AppSettingsLogic.onPushButtonOpenLogsClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logo {
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,34 +14,22 @@ PageBase {
|
||||||
id: back
|
id: back
|
||||||
}
|
}
|
||||||
Caption {
|
Caption {
|
||||||
|
id: caption
|
||||||
text: qsTr("DNS Servers")
|
text: qsTr("DNS Servers")
|
||||||
}
|
}
|
||||||
Image {
|
|
||||||
anchors.horizontalCenter: root.horizontalCenter
|
|
||||||
width: GC.trW(150)
|
|
||||||
height: GC.trH(22)
|
|
||||||
y: GC.trY(590)
|
|
||||||
source: "qrc:/images/AmneziaVPN.png"
|
|
||||||
}
|
|
||||||
LabelType {
|
LabelType {
|
||||||
|
id: l1
|
||||||
x: 40
|
x: 40
|
||||||
y: 95
|
anchors.top: caption.bottom
|
||||||
width: 291
|
width: parent.width - 40
|
||||||
height: 21
|
height: 21
|
||||||
text: qsTr("Primary DNS server")
|
text: qsTr("Primary DNS server")
|
||||||
}
|
}
|
||||||
LabelType {
|
|
||||||
x: 40
|
|
||||||
y: 175
|
|
||||||
width: 291
|
|
||||||
height: 21
|
|
||||||
text: qsTr("Secondray DNS server")
|
|
||||||
}
|
|
||||||
TextFieldType {
|
TextFieldType {
|
||||||
id: dns1
|
id: dns1
|
||||||
x: 40
|
x: 40
|
||||||
y: 120
|
anchors.top: l1.bottom
|
||||||
width: 271
|
width: parent.width - 90
|
||||||
height: 40
|
height: 40
|
||||||
text: NetworkSettingsLogic.lineEditDns1Text
|
text: NetworkSettingsLogic.lineEditDns1Text
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
|
@ -52,11 +40,33 @@ PageBase {
|
||||||
regExp: NetworkSettingsLogic.ipAddressValidatorRegex
|
regExp: NetworkSettingsLogic.ipAddressValidatorRegex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ImageButtonType {
|
||||||
|
id: resetDNS1
|
||||||
|
anchors. left: dns1.right
|
||||||
|
anchors.leftMargin: 10
|
||||||
|
anchors.verticalCenter: dns1.verticalCenter
|
||||||
|
width: 24
|
||||||
|
height: 24
|
||||||
|
icon.source: "qrc:/images/reload.png"
|
||||||
|
onClicked: {
|
||||||
|
NetworkSettingsLogic.onPushButtonResetDns1Clicked()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LabelType {
|
||||||
|
id: l2
|
||||||
|
x: 40
|
||||||
|
anchors.top: dns1.bottom
|
||||||
|
anchors.topMargin: 20
|
||||||
|
width: parent.width - 40
|
||||||
|
height: 21
|
||||||
|
text: qsTr("Secondray DNS server")
|
||||||
|
}
|
||||||
TextFieldType {
|
TextFieldType {
|
||||||
id: dns2
|
id: dns2
|
||||||
x: 40
|
x: 40
|
||||||
y: 200
|
anchors.top: l2.bottom
|
||||||
width: 271
|
width: parent.width - 90
|
||||||
height: 40
|
height: 40
|
||||||
text: NetworkSettingsLogic.lineEditDns2Text
|
text: NetworkSettingsLogic.lineEditDns2Text
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
|
@ -67,21 +77,11 @@ PageBase {
|
||||||
regExp: NetworkSettingsLogic.ipAddressValidatorRegex
|
regExp: NetworkSettingsLogic.ipAddressValidatorRegex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImageButtonType {
|
|
||||||
id: resetDNS1
|
|
||||||
x: 320
|
|
||||||
y: 127
|
|
||||||
width: 24
|
|
||||||
height: 24
|
|
||||||
icon.source: "qrc:/images/reload.png"
|
|
||||||
onClicked: {
|
|
||||||
NetworkSettingsLogic.onPushButtonResetDns1Clicked()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImageButtonType {
|
ImageButtonType {
|
||||||
id: resetDNS2
|
id: resetDNS2
|
||||||
x: 320
|
anchors. left: dns2.right
|
||||||
y: 207
|
anchors.leftMargin: 10
|
||||||
|
anchors.verticalCenter: dns2.verticalCenter
|
||||||
width: 24
|
width: 24
|
||||||
height: 24
|
height: 24
|
||||||
icon.source: "qrc:/images/reload.png"
|
icon.source: "qrc:/images/reload.png"
|
||||||
|
@ -89,4 +89,8 @@ PageBase {
|
||||||
NetworkSettingsLogic.onPushButtonResetDns2Clicked()
|
NetworkSettingsLogic.onPushButtonResetDns2Clicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logo {
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,15 +19,8 @@ PageBase {
|
||||||
text: qsTr("Server settings")
|
text: qsTr("Server settings")
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
}
|
}
|
||||||
Image {
|
|
||||||
anchors.horizontalCenter: root.horizontalCenter
|
|
||||||
width: GC.trW(150)
|
|
||||||
height: GC.trH(22)
|
|
||||||
y: GC.trY(590)
|
|
||||||
source: "qrc:/images/AmneziaVPN.png"
|
|
||||||
}
|
|
||||||
LabelType {
|
LabelType {
|
||||||
x: 20
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
y: 150
|
y: 150
|
||||||
width: 341
|
width: 341
|
||||||
height: 31
|
height: 31
|
||||||
|
@ -66,7 +59,7 @@ PageBase {
|
||||||
BlueButtonType {
|
BlueButtonType {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
y: 410
|
y: 410
|
||||||
width: 300
|
width: parent.width - 40
|
||||||
height: 40
|
height: 40
|
||||||
text: ServerSettingsLogic.pushButtonClearText
|
text: ServerSettingsLogic.pushButtonClearText
|
||||||
visible: ServerSettingsLogic.pushButtonClearVisible
|
visible: ServerSettingsLogic.pushButtonClearVisible
|
||||||
|
@ -77,7 +70,7 @@ PageBase {
|
||||||
BlueButtonType {
|
BlueButtonType {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
y: 350
|
y: 350
|
||||||
width: 300
|
width: parent.width - 40
|
||||||
height: 40
|
height: 40
|
||||||
text: ServerSettingsLogic.pushButtonClearClientCacheText
|
text: ServerSettingsLogic.pushButtonClearClientCacheText
|
||||||
visible: ServerSettingsLogic.pushButtonClearClientCacheVisible
|
visible: ServerSettingsLogic.pushButtonClearClientCacheVisible
|
||||||
|
@ -88,7 +81,7 @@ PageBase {
|
||||||
BlueButtonType {
|
BlueButtonType {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
y: 470
|
y: 470
|
||||||
width: 300
|
width: parent.width - 40
|
||||||
height: 40
|
height: 40
|
||||||
text: qsTr("Forget this server")
|
text: qsTr("Forget this server")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -98,7 +91,7 @@ PageBase {
|
||||||
BlueButtonType {
|
BlueButtonType {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
y: 210
|
y: 210
|
||||||
width: 300
|
width: parent.width - 40
|
||||||
height: 40
|
height: 40
|
||||||
text: qsTr("Protocols and Services")
|
text: qsTr("Protocols and Services")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -108,7 +101,7 @@ PageBase {
|
||||||
BlueButtonType {
|
BlueButtonType {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
y: 260
|
y: 260
|
||||||
width: 300
|
width: parent.width - 40
|
||||||
height: 40
|
height: 40
|
||||||
text: qsTr("Share Server (FULL ACCESS)")
|
text: qsTr("Share Server (FULL ACCESS)")
|
||||||
visible: ServerSettingsLogic.pushButtonShareFullVisible
|
visible: ServerSettingsLogic.pushButtonShareFullVisible
|
||||||
|
@ -116,4 +109,8 @@ PageBase {
|
||||||
ServerSettingsLogic.onPushButtonShareFullClicked()
|
ServerSettingsLogic.onPushButtonShareFullClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logo {
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,11 +143,12 @@ PageBase {
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: conn_type_label
|
id: conn_type_label
|
||||||
|
visible: !GC.isMobile()
|
||||||
x: 20
|
x: 20
|
||||||
anchors.bottom: conn_type_group.top
|
anchors.bottom: conn_type_group.top
|
||||||
anchors.bottomMargin: 10
|
anchors.bottomMargin: 10
|
||||||
width: 281
|
width: 281
|
||||||
height: 21
|
height: GC.isMobile() ? 0: 21
|
||||||
font.family: "Lato"
|
font.family: "Lato"
|
||||||
font.styleName: "normal"
|
font.styleName: "normal"
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
|
@ -161,9 +162,10 @@ PageBase {
|
||||||
Item {
|
Item {
|
||||||
id: conn_type_group
|
id: conn_type_group
|
||||||
x: 20
|
x: 20
|
||||||
|
visible: !GC.isMobile()
|
||||||
anchors.bottom: button_add_site.top
|
anchors.bottom: button_add_site.top
|
||||||
width: 351
|
width: 351
|
||||||
height: 91
|
height: GC.isMobile() ? 0: 91
|
||||||
enabled: VpnLogic.widgetVpnModeEnabled
|
enabled: VpnLogic.widgetVpnModeEnabled
|
||||||
RadioButtonType {
|
RadioButtonType {
|
||||||
x: 0
|
x: 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue