Skip to content
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

[GUI] Add GUI controls for subtract-fee-from-amount #2347

Merged
merged 5 commits into from
Jul 18, 2021

Conversation

random-zebra
Copy link

@random-zebra random-zebra commented Apr 27, 2021

Follow up to #2341.
As per title, add controls for this feature in the graphical interface.

For the moment, it's a simple checkbox, which is visible in case of single recipient.
The confirmation dialog shows the difference in the "total amount" (paid) when the fee is subtracted, or not, from the recipient amount (in the example, sending 1.00 PIV).


When there are multiple recipients, the checkbox is hidden, and controlled by a checkable button inside the contextual menu.

Maybe this is not very intuitive, or pretty, but it does the job.
Later on, possibly with the help of @Neoperol, we can design a better placement for these controls.

Closes #894
Closes #2196

Obviously based on top of

which must be reviewed before this one.

@random-zebra random-zebra added this to the 6.0.0 milestone Apr 27, 2021
@random-zebra random-zebra self-assigned this Apr 27, 2021
@random-zebra random-zebra added the Needs Release Notes Placeholder tag for anything needing mention in the "Notable Changes" section of release notes label May 7, 2021
@random-zebra random-zebra force-pushed the 202104_subtractfee-GUI branch 2 times, most recently from 71f2329 to 2255df7 Compare May 11, 2021 10:39
@random-zebra random-zebra force-pushed the 202104_subtractfee-GUI branch 2 times, most recently from cb6710c to cf2311e Compare May 17, 2021 23:04
@random-zebra random-zebra force-pushed the 202104_subtractfee-GUI branch 2 times, most recently from 0c14464 to 0646b46 Compare June 14, 2021 07:48
@random-zebra
Copy link
Author

Rebased on master, now that #2341 is merged. Ready for review.

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

Worked a bit on this here furszy@dd40114, some styling improvements to the checkbox for the light and dark themes:

  • Aligned the checkbox checked/unchecked text color and check image to the screen styling. So the action does not receive a higher degree of screen focus than the recipient edit boxes.
  • Added checkbox hover selector state.

Side from that, backend process wise, working good 👍 .

When we get some time in-between the priority path, will work on the submenu styling of the dark theme with @Neoperol in another PR. It shouldn't be having a white background.

random-zebra and others added 5 commits July 12, 2021 23:26
We will make the 'subtractFeeFromAmount' a checkable button in the menu
for multiple recipient rows
Visible when single recipient. Its checked state returns whether or not
to subtract the fee from the recipient amount.

SendMultiRow::toggleSubtractFeeFromAmount is not connected for now.
It will be connected with the contextual menu, to set per-recipient
subtract-fee-from-amount, when there are multiple rows.
…dark themes.

* Aligned the checkbox checked/unchecked text color and check image to the screen styling.
* Added checkbox hover selector state.
@random-zebra
Copy link
Author

Rebased on master, picked @furszy's styling commit, and added one more commit for the confirmation dialog.

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

Tested ACK 3e860c5.

src/qt/pivx/sendconfirmdialog.cpp Show resolved Hide resolved
Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

ACK 3e860c5

@random-zebra random-zebra merged commit c4496f4 into PIVX-Project:master Jul 18, 2021
@random-zebra random-zebra removed the Needs Release Notes Placeholder tag for anything needing mention in the "Notable Changes" section of release notes label Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Fee calculation / maybe add a [Feature Request] Subtract Fee From Amount Automatic fee calculation
3 participants