-
Notifications
You must be signed in to change notification settings - Fork 279
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
Add visual accenting for the 'Create new receiving address' button #39
Conversation
This change makes this button visually accented, and gives to users a hint about the primary action. This commit does not change behavior.
When Enter or Return is pressed the default button will be always clicked. All buttons can always be clicked from the keyboard by pressing spacebar when the button has focus.
While testing this, at first my intuition was to click the bottom down menu, but there we have no create address. from From Receiving addresses to Show all receiving addresses ? |
Tested ACK 4ec49f8 on macos. |
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.
utACK, minor nit
<property name="autoDefault"> | ||
<bool>false</bool> | ||
</property> |
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.
I don't think we need to mess with this?
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 change is required.
From Qt docs:
autoDefault : bool
...
This property's default is true for buttons that have a QDialog parent; otherwise it defaults to false.
As ReceiveCoinsDialog
is derived from QDialog
its buttons have autoDefault == true
by default.
Having autoDefault == true
breaks rendering of the default button when tabbing through it (when it is focused out). At least on Linux Mint 20 with system Qt 5.12.8.
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.
Weird, sounds like a Qt bug?
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.
Maybe. Didn't track it down though.
utACK |
…eceiving address' button 4ec49f8 qt: Leverage the default "Create new receiving address" button (Hennadii Stepanov) 4227a8e qt: Make "Create new receiving address" default unconditionally (Hennadii Stepanov) Pull request description: Fix #24 The first commit: - visual improvement with no behavior change The second commit: - removes a bunch of LOCs - slightly change behavior and makes it standard With this PR: ![DeepinScreenshot_select-area_20200721213040](https://user-images.githubusercontent.com/32963518/88093294-7b2a6700-cb9a-11ea-89a2-a0e2678056a7.png) ACKs for top commit: Saibato: Concept tACK bitcoin-core/gui@4227a8e bitcoin-core/gui@4ec49f8 promag: Tested ACK 4ec49f8 on macos. Tree-SHA512: 3403d5ee96ec139491c7e23b24a24d9239fe55c58d99cbd4cd13bc877f76f992ed011c09e2af35b2a63be1a2371b95f6ac719325396dcc8333cf3eb7fa2e3d2c
…eceiving address' button 4ec49f8 qt: Leverage the default "Create new receiving address" button (Hennadii Stepanov) 4227a8e qt: Make "Create new receiving address" default unconditionally (Hennadii Stepanov) Pull request description: Fix #24 The first commit: - visual improvement with no behavior change The second commit: - removes a bunch of LOCs - slightly change behavior and makes it standard With this PR: ![DeepinScreenshot_select-area_20200721213040](https://user-images.githubusercontent.com/32963518/88093294-7b2a6700-cb9a-11ea-89a2-a0e2678056a7.png) ACKs for top commit: Saibato: Concept tACK bitcoin-core/gui@4227a8e bitcoin-core/gui@4ec49f8 promag: Tested ACK 4ec49f8 on macos. Tree-SHA512: 3403d5ee96ec139491c7e23b24a24d9239fe55c58d99cbd4cd13bc877f76f992ed011c09e2af35b2a63be1a2371b95f6ac719325396dcc8333cf3eb7fa2e3d2c
…eceiving address' button 4ec49f8 qt: Leverage the default "Create new receiving address" button (Hennadii Stepanov) 4227a8e qt: Make "Create new receiving address" default unconditionally (Hennadii Stepanov) Pull request description: Fix #24 The first commit: - visual improvement with no behavior change The second commit: - removes a bunch of LOCs - slightly change behavior and makes it standard With this PR: ![DeepinScreenshot_select-area_20200721213040](https://user-images.githubusercontent.com/32963518/88093294-7b2a6700-cb9a-11ea-89a2-a0e2678056a7.png) ACKs for top commit: Saibato: Concept tACK bitcoin-core/gui@4227a8e bitcoin-core/gui@4ec49f8 promag: Tested ACK 4ec49f8 on macos. Tree-SHA512: 3403d5ee96ec139491c7e23b24a24d9239fe55c58d99cbd4cd13bc877f76f992ed011c09e2af35b2a63be1a2371b95f6ac719325396dcc8333cf3eb7fa2e3d2c
…eceiving address' button 4ec49f8 qt: Leverage the default "Create new receiving address" button (Hennadii Stepanov) 4227a8e qt: Make "Create new receiving address" default unconditionally (Hennadii Stepanov) Pull request description: Fix #24 The first commit: - visual improvement with no behavior change The second commit: - removes a bunch of LOCs - slightly change behavior and makes it standard With this PR: ![DeepinScreenshot_select-area_20200721213040](https://user-images.githubusercontent.com/32963518/88093294-7b2a6700-cb9a-11ea-89a2-a0e2678056a7.png) ACKs for top commit: Saibato: Concept tACK bitcoin-core/gui@4227a8e bitcoin-core/gui@4ec49f8 promag: Tested ACK 4ec49f8 on macos. Tree-SHA512: 3403d5ee96ec139491c7e23b24a24d9239fe55c58d99cbd4cd13bc877f76f992ed011c09e2af35b2a63be1a2371b95f6ac719325396dcc8333cf3eb7fa2e3d2c
…eceiving address' button 4ec49f8 qt: Leverage the default "Create new receiving address" button (Hennadii Stepanov) 4227a8e qt: Make "Create new receiving address" default unconditionally (Hennadii Stepanov) Pull request description: Fix #24 The first commit: - visual improvement with no behavior change The second commit: - removes a bunch of LOCs - slightly change behavior and makes it standard With this PR: ![DeepinScreenshot_select-area_20200721213040](https://user-images.githubusercontent.com/32963518/88093294-7b2a6700-cb9a-11ea-89a2-a0e2678056a7.png) ACKs for top commit: Saibato: Concept tACK bitcoin-core/gui@4227a8e bitcoin-core/gui@4ec49f8 promag: Tested ACK 4ec49f8 on macos. Tree-SHA512: 3403d5ee96ec139491c7e23b24a24d9239fe55c58d99cbd4cd13bc877f76f992ed011c09e2af35b2a63be1a2371b95f6ac719325396dcc8333cf3eb7fa2e3d2c
…eceiving address' button 4ec49f8 qt: Leverage the default "Create new receiving address" button (Hennadii Stepanov) 4227a8e qt: Make "Create new receiving address" default unconditionally (Hennadii Stepanov) Pull request description: Fix #24 The first commit: - visual improvement with no behavior change The second commit: - removes a bunch of LOCs - slightly change behavior and makes it standard With this PR: ![DeepinScreenshot_select-area_20200721213040](https://user-images.githubusercontent.com/32963518/88093294-7b2a6700-cb9a-11ea-89a2-a0e2678056a7.png) ACKs for top commit: Saibato: Concept tACK bitcoin-core/gui@4227a8e bitcoin-core/gui@4ec49f8 promag: Tested ACK 4ec49f8 on macos. Tree-SHA512: 3403d5ee96ec139491c7e23b24a24d9239fe55c58d99cbd4cd13bc877f76f992ed011c09e2af35b2a63be1a2371b95f6ac719325396dcc8333cf3eb7fa2e3d2c
…eceiving address' button 4ec49f8 qt: Leverage the default "Create new receiving address" button (Hennadii Stepanov) 4227a8e qt: Make "Create new receiving address" default unconditionally (Hennadii Stepanov) Pull request description: Fix #24 The first commit: - visual improvement with no behavior change The second commit: - removes a bunch of LOCs - slightly change behavior and makes it standard With this PR: ![DeepinScreenshot_select-area_20200721213040](https://user-images.githubusercontent.com/32963518/88093294-7b2a6700-cb9a-11ea-89a2-a0e2678056a7.png) ACKs for top commit: Saibato: Concept tACK bitcoin-core/gui@4227a8e bitcoin-core/gui@4ec49f8 promag: Tested ACK 4ec49f8 on macos. Tree-SHA512: 3403d5ee96ec139491c7e23b24a24d9239fe55c58d99cbd4cd13bc877f76f992ed011c09e2af35b2a63be1a2371b95f6ac719325396dcc8333cf3eb7fa2e3d2c
…eceiving address' button 4ec49f8 qt: Leverage the default "Create new receiving address" button (Hennadii Stepanov) 4227a8e qt: Make "Create new receiving address" default unconditionally (Hennadii Stepanov) Pull request description: Fix #24 The first commit: - visual improvement with no behavior change The second commit: - removes a bunch of LOCs - slightly change behavior and makes it standard With this PR: ![DeepinScreenshot_select-area_20200721213040](https://user-images.githubusercontent.com/32963518/88093294-7b2a6700-cb9a-11ea-89a2-a0e2678056a7.png) ACKs for top commit: Saibato: Concept tACK bitcoin-core/gui@4227a8e bitcoin-core/gui@4ec49f8 promag: Tested ACK 4ec49f8 on macos. Tree-SHA512: 3403d5ee96ec139491c7e23b24a24d9239fe55c58d99cbd4cd13bc877f76f992ed011c09e2af35b2a63be1a2371b95f6ac719325396dcc8333cf3eb7fa2e3d2c
Summary: > qt: Make "Create new receiving address" default unconditionally > > This change makes this button visually accented, and gives to users a > hint about the primary action. > This commit does not change behavior. > qt: Leverage the default "Create new receiving address" button > > When Enter or Return is pressed the default button will be always > clicked. All buttons can always be clicked from the keyboard by pressing > spacebar when the button has focus. This is basically a simplification of the way pressing return in the "Receive" tab of bitcoin-qt submits the form, doing it the standard Qt way without additional code. This is a backport of [[bitcoin-core/gui#39 | core-gui#39]] Test Plan: `ninja && src/qt/bitcoin-qt` In the Receive tab of the main window, verify that pressing Return still submits the form and creates a new address. Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D10135
Fix #24
The first commit:
The second commit:
With this PR: