QML refactoring

This commit is contained in:
pokamest 2023-01-07 13:40:35 +00:00
parent fd905ef308
commit 1d8f342417
33 changed files with 322 additions and 473 deletions

View file

@ -161,5 +161,6 @@
<file>server_scripts/website_tor/Dockerfile</file>
<file>ui/qml/Pages/PageViewConfig.qml</file>
<file>ui/qml/Controls/FlickableType.qml</file>
<file>ui/qml/Controls/UrlButtonType.qml</file>
</qresource>
</RCC>

View file

@ -8,6 +8,8 @@ Item {
readonly property int screenWidth: 380
readonly property int screenHeight: 640
readonly property int defaultMargin: 20
function isMobile() {
if (Qt.platform.os == "android" ||
Qt.platform.os == "ios") {

View file

@ -1,11 +1,12 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import "../Config"
BasicButtonType {
id: root
width: parent.width - 80
height: 40
width: parent.width - 2 * GC.defaultMargin
implicitHeight: 40
background: Rectangle {
anchors.fill: parent

View file

@ -1,14 +1,26 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import "../Config"
Flickable {
id: fl
clip: true
width: parent.width
anchors.topMargin: GC.defaultMargin
anchors.bottom: parent.bottom
anchors.bottomMargin: GC.defaultMargin
anchors.left: root.left
anchors.leftMargin: GC.defaultMargin
anchors.right: root.right
anchors.rightMargin: 1
Keys.onUpPressed: scrollBar.decrease()
Keys.onDownPressed: scrollBar.increase()
ScrollBar.vertical: ScrollBar {
id: scrollBar
policy: fl.height > fl.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
policy: fl.height >= fl.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
}
}

View file

@ -1,9 +1,9 @@
import QtQuick 2.12
import "../Config"
Text {
id: root
x: 40
width: parent.width
width: parent.width - 2 * GC.defaultMargin
anchors.topMargin: 10
font.family: "Lato"

View file

@ -4,7 +4,7 @@ import Qt.labs.platform 1.0
import "../Config"
FlickableType
Flickable
{
property alias textArea: root
id: flickable

View file

@ -1,19 +1,20 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import Qt.labs.platform 1.0
import "../Config"
TextField {
id: root
property bool error: false
width: parent.width - 80
width: parent.width - 2 * GC.defaultMargin
height: 40
anchors.topMargin: 5
selectByMouse: true
selectionColor: "darkgray"
font.pixelSize: 16
color: "#333333"
background: Rectangle {
implicitWidth: 200
implicitHeight: 40

View file

@ -0,0 +1,25 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
BasicButtonType {
property alias label: lbl
id: root
antialiasing: true
height: 21
background: Item {}
contentItem: Text {
id: lbl
anchors.fill: parent
font.family: "Lato"
font.styleName: "normal"
font.pixelSize: 18
font.underline: true
text: root.text
color: "#3045ee"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}

View file

@ -51,7 +51,6 @@ Drawer {
}
FlickableType {
clip: true
anchors.fill: parent
contentHeight: col.height

View file

@ -21,18 +21,9 @@ PageBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: logo.top
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
contentHeight: content.height
clip: true
ColumnLayout {
id: content

View file

@ -17,8 +17,4 @@ Item {
onActivated: pageActive = true
onDeactivated: pageActive = false
// width: GC.screenWidth
// height: GC.screenHeight
}

View file

@ -19,18 +19,10 @@ PageBase {
FlickableType {
id: fl
width: root.width
anchors.top: back.bottom
anchors.topMargin: 0
anchors.bottom: root.bottom
anchors.bottomMargin: 10
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 30
contentHeight: content.height
clip: true
ColumnLayout {
id: content
@ -39,6 +31,7 @@ PageBase {
anchors.topMargin: 10
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: GC.defaultMargin
spacing: 15

View file

@ -1,5 +1,6 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.15
import PageEnum 1.0
import "./"
import "../Controls"
@ -18,11 +19,21 @@ PageBase {
text: qsTr("DNS Servers")
}
CheckBoxType {
id: cb_amnezia_dns
FlickableType {
id: fl
anchors.top: caption.bottom
x: 30
width: parent.width - 60
contentHeight: content.height
ColumnLayout {
id: content
enabled: logic.pageEnabled
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: 15
CheckBoxType {
Layout.preferredWidth: parent.width
text: qsTr("Use AmneziaDNS service (recommended)")
checked: NetworkSettingsLogic.checkBoxUseAmneziaDnsChecked
onCheckedChanged: {
@ -33,29 +44,19 @@ PageBase {
}
LabelType {
id: lb_amnezia_dns
x: 30
anchors.top: cb_amnezia_dns.bottom
width: parent.width - 60
Layout.preferredWidth: parent.width
text: qsTr("Use AmneziaDNS container on your server, when it installed.\n
Your AmneziaDNS server available only when it installed and VPN connected, it has internal IP address 172.29.172.254\n
If AmneziaDNS service is not installed on the same server, or this option is unchecked, the following DNS servers will be used:")
}
LabelType {
id: l1
x: 30
anchors.top: lb_amnezia_dns.bottom
width: parent.width - 30
height: 21
Layout.topMargin: 15
text: qsTr("Primary DNS server")
}
TextFieldType {
id: dns1
x: 30
anchors.top: l1.bottom
width: parent.width - 90
height: 40
implicitWidth: parent.width
text: NetworkSettingsLogic.lineEditDns1Text
onEditingFinished: {
NetworkSettingsLogic.lineEditDns1Text = text
@ -66,13 +67,12 @@ If AmneziaDNS service is not installed on the same server, or this option is unc
regExp: NetworkSettingsLogic.ipAddressRegex
}
}
SvgButtonType {
id: resetDNS1
anchors. left: dns1.right
anchors.leftMargin: 10
anchors.verticalCenter: dns1.verticalCenter
width: 24
height: 24
UrlButtonType {
text: qsTr("Reset to default")
label.horizontalAlignment: Text.AlignLeft
label.verticalAlignment: Text.AlignTop
label.font.pixelSize: 14
icon.source: "qrc:/images/svg/refresh_black_24dp.svg"
onClicked: {
NetworkSettingsLogic.onPushButtonResetDns1Clicked()
@ -81,20 +81,11 @@ If AmneziaDNS service is not installed on the same server, or this option is unc
}
LabelType {
id: l2
x: 30
anchors.top: dns1.bottom
anchors.topMargin: 20
width: parent.width - 60
height: 21
text: qsTr("Secondary DNS server")
}
TextFieldType {
id: dns2
x: 30
anchors.top: l2.bottom
width: parent.width - 90
height: 40
implicitWidth: parent.width
text: NetworkSettingsLogic.lineEditDns2Text
onEditingFinished: {
NetworkSettingsLogic.lineEditDns2Text = text
@ -105,21 +96,20 @@ If AmneziaDNS service is not installed on the same server, or this option is unc
regExp: NetworkSettingsLogic.ipAddressRegex
}
}
SvgButtonType {
id: resetDNS2
anchors. left: dns2.right
anchors.leftMargin: 10
anchors.verticalCenter: dns2.verticalCenter
width: 24
height: 24
UrlButtonType {
text: qsTr("Reset to default")
label.horizontalAlignment: Text.AlignLeft
label.verticalAlignment: Text.AlignTop
label.font.pixelSize: 14
icon.source: "qrc:/images/svg/refresh_black_24dp.svg"
onClicked: {
NetworkSettingsLogic.onPushButtonResetDns2Clicked()
UiLogic.onUpdateAllPages()
}
}
Logo {
anchors.bottom: parent.bottom
}
}
}

View file

@ -8,7 +8,6 @@ import "../Config"
PageBase {
id: root
page: PageEnum.NewServer
//logic: {}
BackButton {
id: back_from_new_server
@ -22,15 +21,15 @@ PageBase {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: qsTr("If you want easily configure your server just run Wizard")
width: parent.width - 80
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: caption.bottom
anchors.topMargin: 30
}
BlueButtonType {
id: pushButtonWizard
text: qsTr("Run Setup Wizard")
anchors.top: labelWizard.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: labelWizard.bottom
anchors.topMargin: 10
onClicked: {
UiLogic.goToPage(PageEnum.Wizard);
@ -41,14 +40,13 @@ PageBase {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: qsTr("Press configure manually to choose VPN protocols you want to install")
width: parent.width - 80
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: pushButtonWizard.bottom
anchors.topMargin: 40
}
BlueButtonType {
text: qsTr("Configure VPN protocols manually")
text: qsTr("Configure")
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: labelManual.bottom
anchors.topMargin: 10

View file

@ -220,7 +220,6 @@ PageBase {
ListView {
id: tb_c
x: 10
width: parent.width - 10
height: tb_c.contentItem.height
currentIndex: -1
@ -427,7 +426,7 @@ PageBase {
width: parent.width - 40
height: 40
text: qsTr("Install new protocols container")
text: qsTr("Install new service")
font.pixelSize: 16
onClicked: container_selector.visible ? container_selector.close() : container_selector.open()

View file

@ -35,10 +35,10 @@ PageBase {
ListView {
id: listWidget_servers
x: 20
x: GC.defaultMargin
anchors.top: caption.bottom
anchors.topMargin: 15
width: parent.width - 30
width: parent.width - GC.defaultMargin - 1
anchors.bottom: parent.bottom
anchors.bottomMargin: 20
model: ServerListLogic.serverListModel

View file

@ -1,5 +1,6 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.15
import PageEnum 1.0
import "./"
import "../Controls"
@ -16,32 +17,34 @@ PageBase {
id: back
}
Caption {
id: caption
text: qsTr("Server settings")
anchors.horizontalCenter: parent.horizontalCenter
}
FlickableType {
id: fl
anchors.top: caption.bottom
anchors.bottom: logo.top
contentHeight: content.height
ColumnLayout {
id: content
enabled: logic.pageEnabled
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: 15
LabelType {
anchors.horizontalCenter: parent.horizontalCenter
y: 150
width: 341
height: 31
Layout.fillWidth: true
font.pixelSize: 20
horizontalAlignment: Text.AlignHCenter
text: ServerSettingsLogic.labelCurrentVpnProtocolText
}
// LabelType {
// anchors.horizontalCenter: parent.horizontalCenter
// y: 120
// width: 341
// height: 31
// font.pixelSize: 20
// horizontalAlignment: Text.AlignHCenter
// text: ServerSettingsLogic.labelServerText
// }
TextFieldType {
anchors.horizontalCenter: parent.horizontalCenter
y: 120
width: 341
height: 31
Layout.fillWidth: true
font.pixelSize: 20
horizontalAlignment: Text.AlignHCenter
text: ServerSettingsLogic.labelServerText
@ -50,71 +53,29 @@ PageBase {
}
LabelType {
anchors.horizontalCenter: parent.horizontalCenter
y: 530
width: 301
height: 41
Layout.fillWidth: true
text: ServerSettingsLogic.labelWaitInfoText
visible: ServerSettingsLogic.labelWaitInfoVisible
}
TextFieldType {
anchors.horizontalCenter: parent.horizontalCenter
y: 80
width: 251
height: 31
Layout.fillWidth: true
text: ServerSettingsLogic.lineEditDescriptionText
onEditingFinished: {
ServerSettingsLogic.lineEditDescriptionText = text
ServerSettingsLogic.onLineEditDescriptionEditingFinished()
}
}
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 410
width: parent.width - 40
height: 40
text: ServerSettingsLogic.pushButtonClearText
visible: ServerSettingsLogic.pushButtonClearVisible
onClicked: {
ServerSettingsLogic.onPushButtonClearServer()
}
}
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 350
width: parent.width - 40
height: 40
text: ServerSettingsLogic.pushButtonClearClientCacheText
visible: ServerSettingsLogic.pushButtonClearClientCacheVisible
onClicked: {
ServerSettingsLogic.onPushButtonClearClientCacheClicked()
}
}
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 470
width: parent.width - 40
height: 40
text: qsTr("Forget this server")
onClicked: {
ServerSettingsLogic.onPushButtonForgetServer()
}
}
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 210
width: parent.width - 40
height: 40
text: qsTr("Protocols and Services")
Layout.topMargin: 20
Layout.fillWidth: true
onClicked: {
UiLogic.goToPage(PageEnum.ServerContainers)
}
}
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 260
width: parent.width - 40
height: 40
Layout.fillWidth: true
text: qsTr("Share Server (FULL ACCESS)")
visible: ServerSettingsLogic.pushButtonShareFullVisible
onClicked: {
@ -122,7 +83,37 @@ PageBase {
}
}
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 60
text: ServerSettingsLogic.pushButtonClearText
visible: ServerSettingsLogic.pushButtonClearVisible
onClicked: {
ServerSettingsLogic.onPushButtonClearServer()
}
}
BlueButtonType {
Layout.fillWidth: true
text: ServerSettingsLogic.pushButtonClearClientCacheText
visible: ServerSettingsLogic.pushButtonClearClientCacheVisible
onClicked: {
ServerSettingsLogic.onPushButtonClearClientCacheClicked()
}
}
BlueButtonType {
Layout.fillWidth: true
text: qsTr("Forget this server")
onClicked: {
ServerSettingsLogic.onPushButtonForgetServer()
}
}
}
}
Logo {
id : logo
anchors.bottom: parent.bottom
}
}

View file

@ -21,18 +21,9 @@ PageBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: root.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
anchors.bottom: next_button.top
contentHeight: content.height
clip: true
ColumnLayout {
id: content
@ -94,11 +85,15 @@ OpenVPN over ShadowSocks profile will be installed.\n")
text: qsTr("I want to improve my privacy on the internet.
OpenVPN profile will be installed.\n")
}
}
}
BlueButtonType {
Layout.fillWidth: true
Layout.preferredHeight: 41
id: next_button
anchors.bottom: parent.bottom
anchors.bottomMargin: GC.defaultMargin
x: GC.defaultMargin
width: parent.width - 2 * GC.defaultMargin
text: qsTr("Next")
onClicked: {
if (radioButton_setup_wizard_high.checked) {
@ -110,6 +105,4 @@ OpenVPN profile will be installed.\n")
}
}
}
}
}
}

View file

@ -21,18 +21,9 @@ PageBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: root.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
anchors.bottom: next_button.top
contentHeight: content.height
clip: true
ColumnLayout {
id: content
@ -84,11 +75,15 @@ You SHOULD set this website address to some foreign website which is not blocked
This protocol support exporting connection profiles to mobile devices by exporting ShadowSocks and Cloak configs (you should launch the 3rd party open source VPN client - ShadowSocks VPN and install Cloak plugin).")
}
}
}
BlueButtonType {
id: next_button
Layout.fillWidth: true
Layout.topMargin: 15
Layout.preferredHeight: 41
anchors.bottom: parent.bottom
anchors.bottomMargin: GC.defaultMargin
x: GC.defaultMargin
width: parent.width - 2 * GC.defaultMargin
text: qsTr("Next")
onClicked: {
let domain = website_masking.text;
@ -98,8 +93,4 @@ This protocol support exporting connection profiles to mobile devices by exporti
UiLogic.goToPage(PageEnum.WizardVpnMode, false)
}
}
}
}
}

View file

@ -21,18 +21,9 @@ PageBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: root.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
anchors.bottom: next_button.top
contentHeight: content.height
clip: true
ColumnLayout {
id: content
@ -57,16 +48,18 @@ We recommend not to use messaging applications for sending the connection profil
text: qsTr('OpenVPN profile will be installed')
verticalAlignment: Text.AlignBottom
}
}
}
BlueButtonType {
id: next_button
Layout.fillWidth: true
Layout.topMargin: 15
Layout.preferredHeight: 41
anchors.bottom: parent.bottom
anchors.bottomMargin: GC.defaultMargin
x: GC.defaultMargin
width: parent.width - 2 * GC.defaultMargin
text: qsTr("Start configuring")
onClicked: {
WizardLogic.onPushButtonLowFinishClicked()
}
}
}
}
}

View file

@ -21,18 +21,9 @@ PageBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: root.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
anchors.bottom: next_button.top
contentHeight: content.height
clip: true
ColumnLayout {
id: content
@ -52,16 +43,18 @@ PageBase {
Layout.topMargin: 15
text: qsTr('OpenVPN over ShadowSocks profile will be installed')
}
}
}
BlueButtonType {
id: next_button
Layout.fillWidth: true
Layout.topMargin: 15
Layout.preferredHeight: 41
anchors.bottom: parent.bottom
anchors.bottomMargin: GC.defaultMargin
x: GC.defaultMargin
width: parent.width - 2 * GC.defaultMargin
text: qsTr("Next")
onClicked: {
UiLogic.goToPage(PageEnum.WizardVpnMode, false)
}
}
}
}
}

View file

@ -21,18 +21,9 @@ PageBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: root.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
anchors.bottom: vpn_mode_finish.top
contentHeight: content.height
clip: true
ColumnLayout {
id: content
@ -57,17 +48,18 @@ You can enable VPN mode "For selected sites" and add blocked sites you need to v
WizardLogic.checkBoxVpnModeChecked = checked
}
}
}
}
BlueButtonType {
id: vpn_mode_finish
Layout.fillWidth: true
Layout.topMargin: 15
Layout.preferredHeight: 41
anchors.bottom: parent.bottom
anchors.bottomMargin: GC.defaultMargin
x: GC.defaultMargin
width: parent.width - 2 * GC.defaultMargin
text: qsTr("Start configuring")
onClicked: {
WizardLogic.onPushButtonVpnModeFinishClicked()
}
}
}
}
}

View file

@ -30,9 +30,7 @@ PageBase {
FlickableType {
clip: true
width: parent.width
anchors.top: caption.bottom
anchors.bottom: root.bottom
contentHeight: col.height
boundsBehavior: Flickable.StopAtBounds
@ -56,7 +54,6 @@ PageBase {
ShareConnectionContent {
x: 10
text: qsTr("Share for Amnezia")
height: 40
width: tb_c.width - 10
@ -65,7 +62,6 @@ PageBase {
ListView {
id: tb_c
x: 10
width: parent.width - 10
height: tb_c.contentItem.height
currentIndex: -1

View file

@ -29,12 +29,12 @@ PageBase {
BasicButtonType {
id: start_switch_page
width: parent.width - 2 * GC.defaultMargin
implicitHeight: 40
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: logo.top
anchors.bottomMargin: 10
width: parent.width - 80
height: 40
anchors.topMargin: 20
text: qsTr("Set up your own server")
@ -71,7 +71,6 @@ PageBase {
verticalAlignment: Text.AlignVCenter
}
antialiasing: true
}
Item {
@ -87,6 +86,7 @@ PageBase {
id: label_connection_code
anchors.top: parent.top
anchors.topMargin: 20
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Connection code")
}
TextFieldType {
@ -286,7 +286,8 @@ PageBase {
}
enabled: StartPageLogic.pushButtonConnectEnabled
}
BasicButtonType {
UrlButtonType {
id: new_sever_connect_key
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: new_sever_connect.bottom
@ -294,21 +295,8 @@ PageBase {
width: 281
height: 21
text: qsTr("Connect using SSH key")
background: Item {
anchors.fill: parent
}
contentItem: Text {
anchors.fill: parent
font.family: "Lato"
font.styleName: "normal"
font.pixelSize: 16
color: "#15CDCB";
text: new_sever_connect_key.text
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
antialiasing: true
label.font.pixelSize: 16
checkable: true
checked: StartPageLogic.pushButtonConnectKeyChecked
onCheckedChanged: {

View file

@ -30,27 +30,12 @@ PageBase {
font.pixelSize: 12
}
BasicButtonType {
UrlButtonType {
y: 10
anchors.horizontalCenter: parent.horizontalCenter
height: 21
background: Item {}
contentItem: Text {
anchors.fill: parent
font.family: "Lato"
font.styleName: "normal"
font.pixelSize: 18
font.underline: true
text: qsTr("Donate")
color: "#D4D4D4"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
label.color: "#D4D4D4"
label.text: qsTr("Donate")
onClicked: {
UiLogic.goToPage(PageEnum.About)

View file

@ -22,18 +22,8 @@ PageBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: root.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
contentHeight: content.height
clip: true
ColumnLayout {
id: content

View file

@ -21,18 +21,8 @@ PageProtocolBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: parent.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
contentHeight: content.height
clip: true
ColumnLayout {
id: content
@ -67,7 +57,7 @@ PageProtocolBase {
}
Rectangle {
id: rect_proto
implicitWidth: root.width - 60
implicitWidth: parent.width
height: 71
border.width: 1
border.color: "lightgray"
@ -75,7 +65,7 @@ PageProtocolBase {
RadioButtonType {
x: 10
y: 40
width: 171
width: parent.width
height: 19
text: qsTr("TCP")
enabled: logic.radioButtonTcpEnabled
@ -87,7 +77,7 @@ PageProtocolBase {
RadioButtonType {
x: 10
y: 10
width: 171
width: parent.width
height: 19
text: qsTr("UDP")
checked: logic.radioButtonUdpChecked
@ -101,16 +91,17 @@ PageProtocolBase {
//
RowLayout {
Layout.topMargin: 10
Layout.fillWidth: true
implicitWidth: parent.width
LabelType {
id: lb_port
height: 31
text: qsTr("Port")
Layout.preferredWidth: root.width / 2 - 10
Layout.preferredWidth: content.width / 2 - 5
}
TextFieldType {
id: tf_port
Layout.fillWidth: true
Layout.preferredWidth: content.width / 2 - 5
Layout.alignment: Qt.AlignRight
height: 31
text: logic.lineEditPortText
@ -121,8 +112,6 @@ PageProtocolBase {
}
}
//
CheckBoxType {
id: check_auto_enc

View file

@ -20,18 +20,8 @@ PageShareProtocolBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: root.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
contentHeight: content.height + 20
clip: true
Behavior on contentY{
NumberAnimation {

View file

@ -20,18 +20,8 @@ PageShareProtocolBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: root.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
contentHeight: content.height
clip: true
ColumnLayout {
id: content

View file

@ -44,18 +44,8 @@ PageShareProtocolBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: root.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
contentHeight: content.height
clip: true
ColumnLayout {
id: content

View file

@ -20,18 +20,8 @@ PageShareProtocolBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: root.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
contentHeight: content.height
clip: true
ColumnLayout {
id: content

View file

@ -20,18 +20,8 @@ PageShareProtocolBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: root.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
contentHeight: content.height
clip: true
ColumnLayout {
id: content

View file

@ -20,18 +20,8 @@ PageShareProtocolBase {
FlickableType {
id: fl
width: root.width
anchors.top: caption.bottom
anchors.topMargin: 20
anchors.bottom: root.bottom
anchors.bottomMargin: 20
anchors.left: root.left
anchors.leftMargin: 30
anchors.right: root.right
anchors.rightMargin: 15
contentHeight: content.height
clip: true
ColumnLayout {
id: content