Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
feat: modify Tk backend managers to use ttk buttons and separators#28659
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
base:main
Are you sure you want to change the base?
Conversation
Add a new class NavigationToolbar2Ttk which uses ttk buttons and separators instead of standard Tk. Modify backend managers to use this new class by default for Tk. Original NavigationToolbar2Tk still exists.Closes issuematplotlib#28607
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.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join uson gitter for real-time discussion.
For details on testing, writing docs, and our review process, please seethe developer guide
We strive to be a welcoming and open project. Please follow ourCode of Conduct.
Looks like this is still awaiting review! |
Bumping this again, as it has been 4 weeks. Do I need to take any additional action? |
This needs to pass the linting review that is failing. I did test this, and it does appear to work, though I've only tried one system (Linux), and don't know about Windows or macOS. |
im = tk.PhotoImage(master=self, file=image_file) | ||
b = ttk.Button(self, text=text, padding=(2, 2), image=im, command=command) | ||
b._ntimage = im | ||
b.pack(side='left') | ||
return b |
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.
This implementation appears outdated compared to the original_Button
.
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'm not sure I see what you mean; the original_Button
uses the standardtk.Button
, which has a rather different implementation and API thanttk.Button
, which is used here.
I'm on vacation for a few weeks and only have access to mobile devices... Sorry! |
I'm afraid I might need some help on this macos pytest failure! It seems it's raising a UserWarning, but it isn't clear to me what part of my code is the issue, as all the snippets shown seem to come from the test code itself? |
That test saves a file, opens a window, then saves the file again, and compares them. If they don't match, the most likely reason is that the window did not preserve the requested size. |
PR summary
Add a new class NavigationToolbar2Ttk which uses ttk buttons and separators instead of standard Tk. Modify backend managers to use this new class by default for Tk. Original NavigationToolbar2Tk still exists.
Closes issue#28607
PR checklist