QML ui fixes

This commit is contained in:
pokamest 2021-10-21 19:49:53 +03:00
parent 377bac67be
commit ca233be127
6 changed files with 87 additions and 65 deletions

View file

@ -1,10 +1,33 @@
ImageButtonType {
import QtQuick 2.12
import QtQuick.Controls 2.12
Button {
id: root
x: 10
y: 10
width: 26
height: 20
icon.source: "qrc:/images/arrow_left.png"
y: 5
width: 41
height: 35
hoverEnabled: true
property bool containsMouse: hovered
background: Item {}
MouseArea {
id: mouseArea
anchors.fill: parent
enabled: false
cursorShape: Qt.PointingHandCursor
}
onClicked: {
UiLogic.closePage()
}
contentItem: Image {
id: img
source: "qrc:/images/arrow_left.png"
anchors.fill: root
anchors.margins: root.containsMouse ? 9 : 10
}
}

View file

@ -4,8 +4,5 @@ import QtQuick.Controls 2.12
Image {
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 30
// width: GC.trW(150)
// height: GC.trH(22)
// y: GC.trY(590)
source: "qrc:/images/AmneziaVPN.png"
}

View file

@ -52,13 +52,6 @@ PageBase {
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 {
x: 30
y: 240
@ -69,7 +62,8 @@ PageBase {
BlueButtonType {
x: 30
y: 280
width: 321
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - 40
height: 41
text: qsTr("Check for updates")
onClicked: {
@ -79,11 +73,16 @@ PageBase {
BlueButtonType {
x: 30
y: 340
width: 321
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - 40
height: 41
text: qsTr("Open logs folder")
onClicked: {
AppSettingsLogic.onPushButtonOpenLogsClicked()
}
}
Logo {
anchors.bottom: parent.bottom
}
}

View file

@ -14,34 +14,22 @@ PageBase {
id: back
}
Caption {
id: caption
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 {
id: l1
x: 40
y: 95
width: 291
anchors.top: caption.bottom
width: parent.width - 40
height: 21
text: qsTr("Primary DNS server")
}
LabelType {
x: 40
y: 175
width: 291
height: 21
text: qsTr("Secondray DNS server")
}
TextFieldType {
id: dns1
x: 40
y: 120
width: 271
anchors.top: l1.bottom
width: parent.width - 90
height: 40
text: NetworkSettingsLogic.lineEditDns1Text
onEditingFinished: {
@ -52,11 +40,33 @@ PageBase {
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 {
id: dns2
x: 40
y: 200
width: 271
anchors.top: l2.bottom
width: parent.width - 90
height: 40
text: NetworkSettingsLogic.lineEditDns2Text
onEditingFinished: {
@ -67,21 +77,11 @@ PageBase {
regExp: NetworkSettingsLogic.ipAddressValidatorRegex
}
}
ImageButtonType {
id: resetDNS1
x: 320
y: 127
width: 24
height: 24
icon.source: "qrc:/images/reload.png"
onClicked: {
NetworkSettingsLogic.onPushButtonResetDns1Clicked()
}
}
ImageButtonType {
id: resetDNS2
x: 320
y: 207
anchors. left: dns2.right
anchors.leftMargin: 10
anchors.verticalCenter: dns2.verticalCenter
width: 24
height: 24
icon.source: "qrc:/images/reload.png"
@ -89,4 +89,8 @@ PageBase {
NetworkSettingsLogic.onPushButtonResetDns2Clicked()
}
}
Logo {
anchors.bottom: parent.bottom
}
}

View file

@ -19,15 +19,8 @@ PageBase {
text: qsTr("Server settings")
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 {
x: 20
anchors.horizontalCenter: parent.horizontalCenter
y: 150
width: 341
height: 31
@ -66,7 +59,7 @@ PageBase {
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 410
width: 300
width: parent.width - 40
height: 40
text: ServerSettingsLogic.pushButtonClearText
visible: ServerSettingsLogic.pushButtonClearVisible
@ -77,7 +70,7 @@ PageBase {
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 350
width: 300
width: parent.width - 40
height: 40
text: ServerSettingsLogic.pushButtonClearClientCacheText
visible: ServerSettingsLogic.pushButtonClearClientCacheVisible
@ -88,7 +81,7 @@ PageBase {
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 470
width: 300
width: parent.width - 40
height: 40
text: qsTr("Forget this server")
onClicked: {
@ -98,7 +91,7 @@ PageBase {
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 210
width: 300
width: parent.width - 40
height: 40
text: qsTr("Protocols and Services")
onClicked: {
@ -108,7 +101,7 @@ PageBase {
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 260
width: 300
width: parent.width - 40
height: 40
text: qsTr("Share Server (FULL ACCESS)")
visible: ServerSettingsLogic.pushButtonShareFullVisible
@ -116,4 +109,8 @@ PageBase {
ServerSettingsLogic.onPushButtonShareFullClicked()
}
}
Logo {
anchors.bottom: parent.bottom
}
}

View file

@ -143,11 +143,12 @@ PageBase {
Text {
id: conn_type_label
visible: !GC.isMobile()
x: 20
anchors.bottom: conn_type_group.top
anchors.bottomMargin: 10
width: 281
height: 21
height: GC.isMobile() ? 0: 21
font.family: "Lato"
font.styleName: "normal"
font.pixelSize: 15
@ -161,9 +162,10 @@ PageBase {
Item {
id: conn_type_group
x: 20
visible: !GC.isMobile()
anchors.bottom: button_add_site.top
width: 351
height: 91
height: GC.isMobile() ? 0: 91
enabled: VpnLogic.widgetVpnModeEnabled
RadioButtonType {
x: 0