Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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 atthe rendered doc and noticed that the Xs are still black, I think maybeedgecolor
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 inwidgets.py
; I just need to work out what exactly the semantics for color/facecolor/edgecolor will be.
Uh oh!
There was an error while loading.Please reload this page.
@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 |
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.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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.xBackport PR#24838 on branch v3.7.x (Add styling support to Check and Radio buttons )
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
This implements arguments to override the styling of
CheckButtons
andRadioButtons
, in a manner similar to the existingToolHandles
orSelector
s. 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
, whichdoes have aCollection
, so they acceptdict
with elements that are singular or lists. However, we don't have aTextCollection
, so I had to make it take adict
orlist of dict
. This seems inconsistent, so perhaps I should attempt to implement the former input here?Fixes#24583
PR Checklist
Documentation and Tests
pytest
passes)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.rst
ornext_api_changes/README.rst