Skip to content

Commit af66daa

Browse files
committed
qml: rework SettingsConnection page to include Proxy settings
SettingsConnection now contains a SwipeView where you can access the connection settings then press on "Proxy Settings" to get to the Proxy configuration page. There is no use-case for Proxy settings to be shown outside of the context of connection settings.
1 parent cfa9c3e commit af66daa

File tree

2 files changed

+37
-9
lines changed

2 files changed

+37
-9
lines changed

src/qml/components/ConnectionSettings.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,6 @@ ColumnLayout {
7070
actionItem: CaretRightButton {
7171
stateColor: gotoProxy.stateColor
7272
}
73+
onClicked: connectionSwipe.incrementCurrentIndex()
7374
}
7475
}

src/qml/pages/settings/SettingsConnection.qml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,40 @@ import QtQuick.Layouts 1.15
88
import "../../controls"
99
import "../../components"
1010

11-
InformationPage {
12-
background: null
13-
clip: true
14-
bannerActive: false
15-
bold: true
16-
headerText: qsTr("Connection settings")
17-
headerMargin: 0
18-
detailActive: true
19-
detailItem: ConnectionSettings {}
11+
Item {
12+
property alias navRightDetail: connectionSwipe.navRightDetail
13+
property alias navLeftDetail: connectionSwipe.navLeftDetail
14+
SwipeView {
15+
id: connectionSwipe
16+
property alias navRightDetail: connection_settings.navRightDetail
17+
property alias navLeftDetail: connection_settings.navLeftDetail
18+
anchors.fill: parent
19+
interactive: false
20+
orientation: Qt.Horizontal
21+
InformationPage {
22+
id: connection_settings
23+
background: null
24+
clip: true
25+
bannerActive: false
26+
bold: true
27+
headerText: qsTr("Connection settings")
28+
headerMargin: 0
29+
detailActive: true
30+
detailItem: ConnectionSettings {}
31+
}
32+
SettingsProxy {
33+
navLeftDetail: NavButton {
34+
iconSource: "image://images/caret-left"
35+
text: qsTr("Back")
36+
onClicked: {
37+
connectionSwipe.decrementCurrentIndex()
38+
}
39+
}
40+
navMiddleDetail: Header {
41+
headerBold: true
42+
headerSize: 18
43+
header: qsTr("Proxy Settings")
44+
}
45+
}
46+
}
2047
}

0 commit comments

Comments
 (0)