Skip to content

Add delta parameters to sliders #20

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 3 commits into from
Sep 12, 2022
Merged

Conversation

Leonti
Copy link
Contributor

@Leonti Leonti commented Sep 11, 2022

This allows to specify min_delta and max_delta parameters when creating sliders.
Useful when default increments are too small (when high precision is not necessary).

width &= 0xfe # ensure divisible by 2
super().__init__(writer, row, col, height, width, fgcolor, bgcolor, bdcolor, value, active, prcolor)
super().__init__(writer, row, col, height, width, fgcolor, bgcolor, bdcolor, value, active, prcolor,
min_delta = min_delta, max_delta = max_delta)
Copy link
Owner

Choose a reason for hiding this comment

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

There is no need to specify the parameter name here. For consistency please treat the args as per other args:

... prcolor, min_delta, max_delta)

(for both sliders).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! 👍

Copy link
Owner

@peterhinch peterhinch left a comment

Choose a reason for hiding this comment

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

I'm OK with this, subject to my comment on args.

@Leonti Leonti requested a review from peterhinch September 11, 2022 14:06
@peterhinch peterhinch merged commit 8e3d8a0 into peterhinch:main Sep 12, 2022
@peterhinch
Copy link
Owner

Thank you.

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.

2 participants