Skip to content

Add OptionButton control #67

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 7 commits into from
Nov 3, 2021
Merged

Conversation

promag
Copy link
Contributor

@promag promag commented Oct 22, 2021

image

Windows
macOS

@hebasto
Copy link
Member

hebasto commented Oct 22, 2021

Rebase on top of the merged #49?

@hebasto
Copy link
Member

hebasto commented Oct 22, 2021

Concept ACK. Looks great!

@hebasto hebasto added the UX Designers' opinions are required label Oct 22, 2021
@promag promag force-pushed the 2021-10-option-button branch 2 times, most recently from a6c389f to 99d4f66 Compare October 22, 2021 17:19
@promag
Copy link
Contributor Author

promag commented Oct 22, 2021

Rebased and split to a new component (ConnectionOptions) where OptionButton is used.

@hebasto
Copy link
Member

hebasto commented Oct 22, 2021

Tested 99d4f66:

qrc:/qml/pages/stub.qml:22:5: QML ColumnLayout: Possible anchor loop detected on centerIn.

@promag
Copy link
Contributor Author

promag commented Oct 22, 2021

@hebasto thanks, didn't notice it, will fix.

@promag promag force-pushed the 2021-10-option-button branch from 99d4f66 to 653d7cd Compare October 22, 2021 21:47
@promag
Copy link
Contributor Author

promag commented Oct 22, 2021

@hebasto see 2390239 description.

@promag
Copy link
Contributor Author

promag commented Oct 22, 2021

0b5fb6b is included so that you can test by pressing TAB to switch between options and SPACE to select it (we don't have focus feedback yet).

@hebasto
Copy link
Member

hebasto commented Oct 27, 2021

0b5fb6b is included so that you can test by pressing TAB to switch between options and SPACE to select it (we don't have focus feedback yet).

Does not work for me on Linux. Only mouse clicks work.

@hebasto
Copy link
Member

hebasto commented Oct 27, 2021

2acd4a7 "qml: Drop import qualifier BitcoinCoreComponents"

Wouldn't it be useful to keep it as is in case if we use import "../components" and import "../controls" in the same QML file?

@promag
Copy link
Contributor Author

promag commented Oct 27, 2021

0b5fb6b is included so that you can test by pressing TAB to switch between options and SPACE to select it (we don't have focus feedback yet).

Does not work for me on Linux. Only mouse clicks work.

Built on ubuntu with depends and works by pressing TAB and SPACE. I'll include focus feedback since @GBKS already has a suggestion for that.

@promag
Copy link
Contributor Author

promag commented Oct 27, 2021

2acd4a7 "qml: Drop import qualifier BitcoinCoreComponents"

Wouldn't it be useful to keep it as is in case if we use import "../components" and import "../controls" in the same QML file?

That should be fine, I don't expect name collisions - at least I'd like to avoid ambiguities.

@promag promag force-pushed the 2021-10-option-button branch from 653d7cd to 4c4aa30 Compare October 27, 2021 22:25
@promag
Copy link
Contributor Author

promag commented Oct 27, 2021

Now with hover and focus feedback.

Rebased on top of #73 to have the macOS artifact.

@promag promag force-pushed the 2021-10-option-button branch 2 times, most recently from e143115 to 6af285e Compare October 28, 2021 14:47
@promag
Copy link
Contributor Author

promag commented Oct 28, 2021

Rebased, made adjustments suggested by @GBKS, made ConnectionOptions extend Pane to better handle keyboard focus, set 1st option as the default control to have keyboard focus.

@promag promag force-pushed the 2021-10-option-button branch from 6af285e to b70ee53 Compare October 29, 2021 08:23
@promag
Copy link
Contributor Author

promag commented Oct 29, 2021

Rebased on #74.

@promag promag force-pushed the 2021-10-option-button branch 2 times, most recently from b70ee53 to 7cde50b Compare October 29, 2021 13:45
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.

Tested 7cde50b on Linux Mint 20.2 (Qt 5.12.8).

Tab (focus moving) and Space (focus selecting) work as expected.

What should be a role of the Return key in focus treatment?

Also:

$ src/qt/bitcoin-qt -signet
qrc:/qml/pages/stub.qml:34:9: QML Pane: Binding loop detected for property "implicitHeight"
qrc:/qml/pages/stub.qml:34:9: QML Pane: Binding loop detected for property "implicitHeight"

@promag
Copy link
Contributor Author

promag commented Oct 30, 2021

Thanks @hebasto, will address both comments.

Label implicit height depends on the font size but the font size depends
on the label height. This results in a runtime anchor loop warning.
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 7, 2025
Label implicit height depends on the font size but the font size depends
on the label height. This results in a runtime anchor loop warning.

Github-Pull: bitcoin-core#67
Rebased-From: 6bedd3d
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 7, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
Follow Qt recomendation (1) since the background is a solid color.

1.
https://doc.qt.io/qt-5/qml-qtquick-controls2-applicationwindow.html#background-prop

Github-Pull: bitcoin-core#67
Rebased-From: cd5527f
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
Label implicit height depends on the font size but the font size depends
on the label height. This results in a runtime anchor loop warning.

Github-Pull: bitcoin-core#67
Rebased-From: 6bedd3d
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
Follow Qt recomendation (1) since the background is a solid color.

1.
https://doc.qt.io/qt-5/qml-qtquick-controls2-applicationwindow.html#background-prop

Github-Pull: bitcoin-core#67
Rebased-From: cd5527f
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
Label implicit height depends on the font size but the font size depends
on the label height. This results in a runtime anchor loop warning.

Github-Pull: bitcoin-core#67
Rebased-From: 6bedd3d
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
Follow Qt recomendation (1) since the background is a solid color.

1.
https://doc.qt.io/qt-5/qml-qtquick-controls2-applicationwindow.html#background-prop

Github-Pull: bitcoin-core#67
Rebased-From: cd5527f
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
Label implicit height depends on the font size but the font size depends
on the label height. This results in a runtime anchor loop warning.

Github-Pull: bitcoin-core#67
Rebased-From: 6bedd3d
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
Follow Qt recomendation (1) since the background is a solid color.

1.
https://doc.qt.io/qt-5/qml-qtquick-controls2-applicationwindow.html#background-prop

Github-Pull: bitcoin-core#67
Rebased-From: cd5527f
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
Label implicit height depends on the font size but the font size depends
on the label height. This results in a runtime anchor loop warning.

Github-Pull: bitcoin-core#67
Rebased-From: 6bedd3d
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
UX Designers' opinions are required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants