-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 percentage to FSRS spinner #3679
base: main
Are you sure you want to change the base?
Conversation
This commit add a percentage option in SpinBox and SpinBoxFloatRow, set to False by default. If it's true, a percent symbol is added at the end of the line before the increase/decrease button. While the value is represented as a percentage without decimal places, the internal representation is not changed. Which mean that a multiplier must used to compute the string value, indicate to the input field the min, max and step, and when updating the result.
As mentioned on discord if you know how to make the css, I'd love it. |
First one looks tricky but the second should be easy to implement, and I think looks better than the current implementation. |
Would localisation need to be handled?
|
True, good point. Technically localization needs to be handled there as well. |
Related to localization: #3677 It's tricky here though because we have an input. |
@dae I'd like you to add this to 25.01 milestones, please. Making desired retention a percentage, I mean. |
I don't object to the move to a percentage, but I find the current formatting to be pretty ugly I'm afraid. Until a CSS guru comes along with a simple+good looking solution, a simpler solution like removing the displayed '%' symbol from the right (while still showing 90 instead of 0.9) would unblock this. |
This commit add a percentage option in SpinBox and SpinBoxFloatRow, set to False by default.
If it's true, a percent symbol is added at the end of the line before the increase/decrease button.
While the value is represented as a percentage without decimal places, the internal representation is not changed. Which mean that a multiplier must used to compute the string value, indicate to the input field the min, max and step, and when updating the result.
Currently result is as this
I was able to obtain
but not to let it be very close to the number, nor to put it outside of the box on the left of the reset value.
If anyone knows their CSS well, that could be helpful here. At least the data part is correctly ported