-
Notifications
You must be signed in to change notification settings - Fork 50
Add and demo ConnectionSettings and ContinueButton components #101
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
Conversation
8f801eb
to
533993f
Compare
updated from 8f801eb -> 533993f Changes:
|
533993f
to
5d10e90
Compare
updated from 533993f -> 5d10e90 changes:
|
5d10e90
to
e12442b
Compare
src/qml/pages/stub.qml
Outdated
ConnectionOptions { | ||
Layout.preferredWidth: 400 | ||
focus: true | ||
StackLayout { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI stack doesn't support animation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a blocker for this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it's just used here for simplicity of the demo. #106 uses an uninteractive SwipeView which has the animations we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the last commit (a demo) be dropped from this PR, to avoid conflicts with #110? |
e12442b
to
c026a3e
Compare
updated from e12442b -> c026a3e Changes: drop last commit to avoid conflict with #110. The demo of this PR has been moved to: connection-settings-demo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-ACK c026a3e
spacing: 20 | ||
Setting { | ||
Layout.fillWidth: true | ||
header: "Use cellular data" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget about translations? Use qsTr()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in #111
property bool last: false | ||
property string header | ||
property string description | ||
contentItem: GridLayout { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really a grid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be a more appropriate Layout for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A ColumnLayout with a nested RowLayout
Control { | ||
id: root | ||
property bool last: false | ||
property string header |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want these required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in #111
|
||
Control { | ||
id: root | ||
property bool last: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be automatic, here's a simple approach that doesn't take into account if visible
property:
property bool last: parent && root == parent.children[parent.children.length - 1]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in #111
implicitWidth: 45 | ||
implicitHeight: 28 | ||
x: root.leftPadding | ||
y: parent.height / 2 - height / 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Math.round((parent.height - height) / 2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in #111
f5458f2 qml: Make further suggested changes to Settings.qml (Shashwat) a0ba0d7 qml: Replace GridLayout with nested Column Row Layout in Settings.qml (Shashwat) be87ba9 qml: Use Math.round() in OptionSwitch.qml (Shashwat) fe41329 qml: Using qsTr() with strings in ConnectionSettings.qml (Shashwat) Pull request description: - This PR is a follow-up to #101 and addresses suggestions of [this](#101 (comment)) comment. - The changes are split into separate commits so that they can be easier to review, and reason with. ACKs for top commit: promag: Code review ACK f5458f2. Tree-SHA512: f1a421a74fcf61a861720f4a9ad489042964f022db186fce6f9d9013af37f6575a2bef11ea02c4b79eeefdd8e89aab4f2bae86a0d30d0e47b889ce4d595781fc
Github-Pull: bitcoin-core#101 Rebased-From: d038898
Github-Pull: bitcoin-core#101 Rebased-From: f41fb20
Github-Pull: bitcoin-core#101 Rebased-From: d7eea93
Github-Pull: bitcoin-core#101 Rebased-From: c026a3e
Github-Pull: bitcoin-core#101 Rebased-From: d038898
Github-Pull: bitcoin-core#101 Rebased-From: f41fb20
Github-Pull: bitcoin-core#101 Rebased-From: d7eea93
Github-Pull: bitcoin-core#101 Rebased-From: c026a3e
Github-Pull: bitcoin-core#101 Rebased-From: d038898
Github-Pull: bitcoin-core#101 Rebased-From: f41fb20
Github-Pull: bitcoin-core#101 Rebased-From: d7eea93
Github-Pull: bitcoin-core#101 Rebased-From: c026a3e
Github-Pull: bitcoin-core#101 Rebased-From: d038898
Github-Pull: bitcoin-core#101 Rebased-From: f41fb20
Github-Pull: bitcoin-core#101 Rebased-From: d7eea93
Github-Pull: bitcoin-core#101 Rebased-From: c026a3e
Github-Pull: bitcoin-core#101 Rebased-From: d038898
Github-Pull: bitcoin-core#101 Rebased-From: f41fb20
Github-Pull: bitcoin-core#101 Rebased-From: d7eea93
Github-Pull: bitcoin-core#101 Rebased-From: c026a3e
This introduces the
ConnectionSettings
component, which represents the detailed connections settings page as designed in the main design file. It also introduces the controls the component depends on,Setting
andOptionSwitch
. Missing is the Text button that is used for settings which require an input value, because the functionality of that component needs to be discussed.The
Setting
control represents an individual setting of theConnectionSettings
components, this component uses theHeader
control for its text.OptionSwitch
represents the toggle button shown in the design.To accomplish a proper demo of this component, this places our forms (ConnectionOptions and ConnectionSettings) into a StackLayout. The
ContinueButton
is introduced to advance/rewind the stack. APageIndicator
is added to highlight the functionality of the demo.Additionally, to fix the annoying behavior of the stub currently, this makes the dimensions of the stub page dependent on it's contents width. 😄
Image of added components:
