-
Notifications
You must be signed in to change notification settings - Fork 521
customized style for SegmentedButton also need wrap #4314
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
customized style for SegmentedButton also need wrap #4314
Conversation
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.
Thanks for your PR.
While on this, can you please refactor that method to look like this:
flet/sdk/python/packages/flet/src/flet/core/elevated_button.py
Lines 171 to 174 in cc998cd
style.side = self._wrap_attr_dict(style.side) | |
style.shape = self._wrap_attr_dict(style.shape) | |
style.padding = self._wrap_attr_dict(style.padding) | |
style.text_style = self._wrap_attr_dict(style.text_style) |
(use local var
style
instead of self.__style
)
use local var |
That's actually the reason why we need this local var If you don't understand what is to be done, let me know and I will complete your PR. |
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.
Looks good to me, thanks!
got it. thanks for your explanation. The code was updated to use local var instead. |
Description
User customized style passed to SegmentedButton also need wrap, or it raise errors.
Fixes #4313
Screenshots (if applicable):
Summary by Sourcery
Bug Fixes: