diff --git a/client/resources.qrc b/client/resources.qrc
index 840d878c..5d708c6a 100644
--- a/client/resources.qrc
+++ b/client/resources.qrc
@@ -103,5 +103,6 @@
ui/qml/Pages/Protocols/PageProtoCloak.qml
ui/qml/Pages/Protocols/PageProtoOpenVPN.qml
ui/qml/Pages/Protocols/PageProtoShadowSocks.qml
+ ui/qml/Controls/BackButton.qml
diff --git a/client/ui/qml/Controls/BackButton.qml b/client/ui/qml/Controls/BackButton.qml
new file mode 100644
index 00000000..45423b6b
--- /dev/null
+++ b/client/ui/qml/Controls/BackButton.qml
@@ -0,0 +1,10 @@
+ImageButtonType {
+ x: 10
+ y: 10
+ width: 26
+ height: 20
+ icon.source: "qrc:/images/arrow_left.png"
+ onClicked: {
+ UiLogic.closePage()
+ }
+}
diff --git a/client/ui/qml/Pages/PageAppSetting.qml b/client/ui/qml/Pages/PageAppSetting.qml
index e0b93ea8..29604fad 100644
--- a/client/ui/qml/Pages/PageAppSetting.qml
+++ b/client/ui/qml/Pages/PageAppSetting.qml
@@ -6,16 +6,8 @@ import "../Config"
PageBase {
id: root
- ImageButtonType {
+ BackButton {
id: back
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Text {
font.family: "Lato"
diff --git a/client/ui/qml/Pages/PageGeneralSettings.qml b/client/ui/qml/Pages/PageGeneralSettings.qml
index fee114f6..8d1c376f 100644
--- a/client/ui/qml/Pages/PageGeneralSettings.qml
+++ b/client/ui/qml/Pages/PageGeneralSettings.qml
@@ -7,16 +7,8 @@ import "../Config"
Item {
id: root
- ImageButtonType {
+ BackButton {
id: back
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Rectangle {
y: 40
diff --git a/client/ui/qml/Pages/PageNetworkSetting.qml b/client/ui/qml/Pages/PageNetworkSetting.qml
index 764b1ff3..1d974a11 100644
--- a/client/ui/qml/Pages/PageNetworkSetting.qml
+++ b/client/ui/qml/Pages/PageNetworkSetting.qml
@@ -6,16 +6,8 @@ import "../Config"
Item {
id: root
- ImageButtonType {
+ BackButton {
id: back
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Text {
font.family: "Lato"
diff --git a/client/ui/qml/Pages/PageNewServer.qml b/client/ui/qml/Pages/PageNewServer.qml
index 29cd1bf9..e76c840d 100644
--- a/client/ui/qml/Pages/PageNewServer.qml
+++ b/client/ui/qml/Pages/PageNewServer.qml
@@ -7,6 +7,9 @@ import "../Config"
Item {
id: root
+ BackButton {
+ id: back_from_new_server
+ }
Text {
font.family: "Lato"
font.styleName: "normal"
@@ -68,16 +71,4 @@ Item {
y: GC.trY(590)
source: "qrc:/images/AmneziaVPN.png"
}
- ImageButtonType {
- id: back_from_new_server
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
- }
-
}
diff --git a/client/ui/qml/Pages/PageNewServerProtocols.qml b/client/ui/qml/Pages/PageNewServerProtocols.qml
index 4b968098..a92d90cb 100644
--- a/client/ui/qml/Pages/PageNewServerProtocols.qml
+++ b/client/ui/qml/Pages/PageNewServerProtocols.qml
@@ -6,16 +6,8 @@ import "../Config"
Item {
id: root
- ImageButtonType {
+ BackButton {
id: back
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Text {
font.family: "Lato"
diff --git a/client/ui/qml/Pages/PageServerContainers.qml b/client/ui/qml/Pages/PageServerContainers.qml
index e9181625..0a3d4876 100644
--- a/client/ui/qml/Pages/PageServerContainers.qml
+++ b/client/ui/qml/Pages/PageServerContainers.qml
@@ -7,16 +7,8 @@ import "../Config"
Item {
id: root
enabled: ServerContainersLogic.pageEnabled
- ImageButtonType {
+ BackButton {
id: back
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Text {
font.family: "Lato"
diff --git a/client/ui/qml/Pages/PageServerList.qml b/client/ui/qml/Pages/PageServerList.qml
index 510381c1..73135579 100644
--- a/client/ui/qml/Pages/PageServerList.qml
+++ b/client/ui/qml/Pages/PageServerList.qml
@@ -8,16 +8,8 @@ import "../Config"
Item {
id: root
- ImageButtonType {
+ BackButton {
id: back
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Text {
font.family: "Lato"
diff --git a/client/ui/qml/Pages/PageServerSettings.qml b/client/ui/qml/Pages/PageServerSettings.qml
index 5bada514..eaf39748 100644
--- a/client/ui/qml/Pages/PageServerSettings.qml
+++ b/client/ui/qml/Pages/PageServerSettings.qml
@@ -9,16 +9,8 @@ Item {
id: root
enabled: ServerSettingsLogic.pageEnabled
- ImageButtonType {
+ BackButton {
id: back
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Text {
font.family: "Lato"
diff --git a/client/ui/qml/Pages/PageSetupWizard.qml b/client/ui/qml/Pages/PageSetupWizard.qml
index b67d0a55..ab3cb5ab 100644
--- a/client/ui/qml/Pages/PageSetupWizard.qml
+++ b/client/ui/qml/Pages/PageSetupWizard.qml
@@ -7,16 +7,8 @@ import "../Config"
Item {
id: root
- ImageButtonType {
+ BackButton {
id: back_from_setup_wizard
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Text {
font.family: "Lato"
diff --git a/client/ui/qml/Pages/PageSetupWizardHighLevel.qml b/client/ui/qml/Pages/PageSetupWizardHighLevel.qml
index aed1f54b..9a676146 100644
--- a/client/ui/qml/Pages/PageSetupWizardHighLevel.qml
+++ b/client/ui/qml/Pages/PageSetupWizardHighLevel.qml
@@ -7,16 +7,8 @@ import "../Config"
Item {
id: root
- ImageButtonType {
+ BackButton {
id: back_from_setup_wizard
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Text {
font.family: "Lato"
diff --git a/client/ui/qml/Pages/PageSetupWizardLowLevel.qml b/client/ui/qml/Pages/PageSetupWizardLowLevel.qml
index fede63a6..9bbfd585 100644
--- a/client/ui/qml/Pages/PageSetupWizardLowLevel.qml
+++ b/client/ui/qml/Pages/PageSetupWizardLowLevel.qml
@@ -6,16 +6,8 @@ import "../Config"
Item {
id: root
- ImageButtonType {
+ BackButton {
id: back_from_setup_wizard
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Text {
font.family: "Lato"
diff --git a/client/ui/qml/Pages/PageSetupWizardVPNMode.qml b/client/ui/qml/Pages/PageSetupWizardVPNMode.qml
index 696e2275..2a5b3a88 100644
--- a/client/ui/qml/Pages/PageSetupWizardVPNMode.qml
+++ b/client/ui/qml/Pages/PageSetupWizardVPNMode.qml
@@ -6,16 +6,8 @@ import "../Config"
Item {
id: root
- ImageButtonType {
+ BackButton {
id: back_from_setup_wizard
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Text {
font.family: "Lato"
diff --git a/client/ui/qml/Pages/PageShareConnection.qml b/client/ui/qml/Pages/PageShareConnection.qml
index 84006931..46628ae5 100644
--- a/client/ui/qml/Pages/PageShareConnection.qml
+++ b/client/ui/qml/Pages/PageShareConnection.qml
@@ -6,18 +6,9 @@ import "../Config"
Item {
id: root
- ImageButtonType {
+ BackButton {
id: back
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
-
ScrollView {
x: 10
y: 40
diff --git a/client/ui/qml/Pages/PageSites.qml b/client/ui/qml/Pages/PageSites.qml
index ce19fca2..b7f8fadc 100644
--- a/client/ui/qml/Pages/PageSites.qml
+++ b/client/ui/qml/Pages/PageSites.qml
@@ -8,6 +8,9 @@ import "../Config"
Item {
id: root
+ BackButton {
+ id: back
+ }
Text {
font.family: "Lato"
font.styleName: "normal"
@@ -48,17 +51,6 @@ Item {
SitesLogic.onPushButtonAddCustomSitesClicked()
}
}
- ImageButtonType {
- id: back
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
- }
BlueButtonType {
id: sites_add
x: 260
diff --git a/client/ui/qml/Pages/PageStart.qml b/client/ui/qml/Pages/PageStart.qml
index a4c8eed2..bc3ea304 100644
--- a/client/ui/qml/Pages/PageStart.qml
+++ b/client/ui/qml/Pages/PageStart.qml
@@ -6,6 +6,9 @@ import "../Config"
Item {
id: root
+ BackButton {
+ id: back_from_start
+ }
Image {
anchors.horizontalCenter: root.horizontalCenter
width: GC.trW(150)
@@ -292,18 +295,4 @@ Item {
visible: false
}
}
-
-
- ImageButtonType {
- id: back_from_start
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- visible: StartPageLogic.pushButtonBackFromStartVisible
- onClicked: {
- UiLogic.closePage()
- }
- }
}
diff --git a/client/ui/qml/Pages/Protocols/PageProtoCloak.qml b/client/ui/qml/Pages/Protocols/PageProtoCloak.qml
index 0c885009..461dee8d 100644
--- a/client/ui/qml/Pages/Protocols/PageProtoCloak.qml
+++ b/client/ui/qml/Pages/Protocols/PageProtoCloak.qml
@@ -7,16 +7,8 @@ import "../../Config"
Item {
id: root
enabled: CloakLogic.pageProtoCloakEnabled
- ImageButtonType {
+ BackButton {
id: back
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Item {
x: 0
diff --git a/client/ui/qml/Pages/Protocols/PageProtoOpenVPN.qml b/client/ui/qml/Pages/Protocols/PageProtoOpenVPN.qml
index 7b41769c..952e6dfc 100644
--- a/client/ui/qml/Pages/Protocols/PageProtoOpenVPN.qml
+++ b/client/ui/qml/Pages/Protocols/PageProtoOpenVPN.qml
@@ -7,16 +7,8 @@ import "../../Config"
Item {
id: root
enabled: OpenVpnLogic.pageProtoOpenVpnEnabled
- ImageButtonType {
+ BackButton {
id: back
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Item {
x: 0
diff --git a/client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml b/client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml
index 8a6e8454..85b3f808 100644
--- a/client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml
+++ b/client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml
@@ -7,16 +7,8 @@ import "../../Config"
Item {
id: root
enabled: ShadowSocksLogic.pageProtoShadowSocksEnabled
- ImageButtonType {
+ BackButton {
id: back
- x: 10
- y: 10
- width: 26
- height: 20
- icon.source: "qrc:/images/arrow_left.png"
- onClicked: {
- UiLogic.closePage()
- }
}
Item {
x: 0