Repository navigation
Give the Tk toolbar buttons a flat look - #22174
Conversation
timhoffm
left a comment
There was a problem hiding this comment.
I think this looks nicer and more modern.
| b = tk.Button(master=self, text=text, command=command) | ||
| b = tk.Button( | ||
| master=self, text=text, command=command, | ||
| relief="flat", overrelief="groove", borderwidth=1, |
There was a problem hiding this comment.
Is the border width inside or outside the button? Just wondering if the size we allocate is consistent on HiDPI screens?
There was a problem hiding this comment.
It's outside of the button, and the default width seems to be 2, so space shouldn't be an issue.
There was a problem hiding this comment.
I'm more concerned about the height of the toolbar than the width of the border itself.
There was a problem hiding this comment.
The toolbar height is set to the height of two text lines here, which on all platforms I've tried is bigger than the size of the buttons, so the buttons becoming 2px smaller shouldn't affect the height of the toolbar.
PR Summary
This changes the parameters of the buttons in the Tk navigation toolbar to give them a flat look (with an outline showing when the mouse is over the button), similar to the Qt backend. For comparison:


Old:
New: