Skip to content

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

Merged
merged 4 commits into from
Jan 10, 2022

Conversation

jarolrod
Copy link
Member

@jarolrod jarolrod commented Jan 4, 2022

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 and OptionSwitch. 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 the ConnectionSettings components, this component uses the Header 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. A PageIndicator 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:
Screen Shot 2022-01-03 at 9 28 59 PM

Windows
macOS
Android

@jarolrod
Copy link
Member Author

jarolrod commented Jan 5, 2022

updated from 8f801eb -> 533993f

Changes:

  • rebased over master
  • updated include versions
  • Settings.qml
    • Setting control base type changed from Item to control
    • removed instances of height: sourceComponent.height
    • removed setting implicitHeight
  • dropped change on the stubs size as it's not relevant to the goal of this PR

@jarolrod jarolrod force-pushed the connection-settings branch from 533993f to 5d10e90 Compare January 5, 2022 19:29
@jarolrod
Copy link
Member Author

jarolrod commented Jan 5, 2022

updated from 533993f -> 5d10e90

changes:

@jarolrod jarolrod force-pushed the connection-settings branch from 5d10e90 to e12442b Compare January 5, 2022 19:46
@jarolrod
Copy link
Member Author

jarolrod commented Jan 5, 2022

updated from 5d10e90 -> e12442b

Changes:

  • in settings.qml bind visible to active

ConnectionOptions {
Layout.preferredWidth: 400
focus: true
StackLayout {
Copy link
Contributor

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.

Copy link
Member

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

Copy link
Member Author

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.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e12442b, tested on Linux Mint 20.3 (with depends).

As this PR has no conflicts with #110, going to merge it.

@hebasto
Copy link
Member

hebasto commented Jan 9, 2022

Could the last commit (a demo) be dropped from this PR, to avoid conflicts with #110?

@jarolrod jarolrod force-pushed the connection-settings branch from e12442b to c026a3e Compare January 10, 2022 16:44
@jarolrod
Copy link
Member Author

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

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-ACK c026a3e

@hebasto hebasto merged commit 574a701 into bitcoin-core:main Jan 10, 2022
spacing: 20
Setting {
Layout.fillWidth: true
header: "Use cellular data"
Copy link
Contributor

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()?

Copy link
Contributor

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 {
Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Member Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want these required?

Copy link
Contributor

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
Copy link
Contributor

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]

Copy link
Contributor

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
Copy link
Contributor

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)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #111

hebasto added a commit that referenced this pull request Jan 13, 2022
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
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 7, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 7, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 7, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 7, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants