Skip to content

qml: Follow-up to PR#101 #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/qml/components/ConnectionSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ ColumnLayout {
spacing: 20
Setting {
Layout.fillWidth: true
header: "Use cellular data"
header: qsTr("Use cellular data")
}
Setting {
Layout.fillWidth: true
header: "Daily upload limit"
header: qsTr("Daily upload limit")
}
Setting {
Layout.fillWidth: true
header: "Connection limit"
header: qsTr("Connection limit")
}
Setting {
Layout.fillWidth: true
header: "Listening enabled"
description: "Reduces data usage."
header: qsTr("Listening enabled")
description: qsTr("Reduces data usage.")
}
Setting {
last: true
Layout.fillWidth: true
header: "Blocks Only"
description: "Do not transfer unconfirmed transactions. Also disabled listening."
header: qsTr("Blocks Only")
description: qsTr("Do not transfer unconfirmed transactions. Also disabled listening.")
}
}
2 changes: 1 addition & 1 deletion src/qml/controls/OptionSwitch.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Switch {
implicitWidth: 45
implicitHeight: 28
x: root.leftPadding
y: parent.height / 2 - height / 2
y: Math.round((parent.height - height) / 2)
radius: 18
color: root.checked ? "#F7931A" : "#DDDDDD"
Rectangle {
Expand Down
33 changes: 17 additions & 16 deletions src/qml/controls/Setting.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,25 @@ import QtQuick.Layouts 1.15

Control {
id: root
property bool last: false
property string header
property bool last: parent && root === parent.children[parent.children.length - 1]
required property string header
property string description
contentItem: GridLayout {
columns: 2
rowSpacing: 20
contentItem: ColumnLayout {
spacing: 20
width: parent.width
Header {
Layout.fillWidth: true
center: false
header: root.header
headerSize: 18
description: root.description
descriptionSize: 15
descriptionMargin: 0
}
OptionSwitch {
Layout.alignment: Qt.AlignRight
RowLayout {
Header {
Layout.fillWidth: true
center: false
header: root.header
headerSize: 18
description: root.description
descriptionSize: 15
descriptionMargin: 0
}
OptionSwitch {
Layout.alignment: Qt.AlignRight
}
}
Loader {
Layout.fillWidth:true
Expand Down