-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add styling support to Check and Radio buttons #24838
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
Conversation
8ee6f04 to
2c895fb
Compare
examples/widgets/check_buttons.py
Outdated
| actives=[l.get_visible() for l in lines_by_label.values()], | ||
| label_props=[{'color': 'k'}, {'color': 'r'}, {'color': 'g'}], | ||
| frame_props={'edgecolor': ['k', 'r', 'g']}, | ||
| check_props={'facecolor': ['k', 'r', 'g']}, |
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 looked at the rendered doc and noticed that the Xs are still black, I think maybe edgecolor is what was intended here?
| check_props={'facecolor': ['k', 'r', 'g']}, | |
| check_props={'edgecolor': ['k', 'r', 'g']}, |
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.
No, the bug is in widgets.py; I just need to work out what exactly the semantics for color/facecolor/edgecolor will be.
|
@QuLogic I think you had indicated in alternate communication channels that this was ready for review, but it is still marked as draft. |
|
@ksunden Ah, sorry, I thought I pushed the button here; maybe an outdated browser page or something. |
|
Probably should have a |
|
Added the what's new and handling of |
dstansby
left a comment
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.
Lots of suggestions and minor comments. The major change request I have is to double check this is working - I think it's worth adding a test that doesn't compare new API to new API, and looking at the what's new entry some of the styling for check buttons doesn't seem to be applied.
|
I modified a test image to include old and new versions, and I think should've handling your other comments in a previous push. |
…838-on-v3.7.x Backport PR #24838 on branch v3.7.x (Add styling support to Check and Radio buttons )
PR Summary
This implements arguments to override the styling of
CheckButtonsandRadioButtons, in a manner similar to the existingToolHandlesorSelectors. This depends on #23457 to avoid the conflicts on the arguments. I updated the examples to show what this looks like, but not the tests or documentation yet. I have two questions:scatter, which does have aCollection, so they acceptdictwith elements that are singular or lists. However, we don't have aTextCollection, so I had to make it take adictorlist of dict. This seems inconsistent, so perhaps I should attempt to implement the former input here?Fixes #24583
PR Checklist
Documentation and Tests
pytestpasses)Release Notes
.. versionadded::directive in the docstring and documented indoc/users/next_whats_new/.. versionchanged::directive in the docstring and documented indoc/api/next_api_changes/next_whats_new/README.rstornext_api_changes/README.rst