| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Thanks for the fix, it looks good to me. Could you add a comment in the code, since I don't think it's super obvious what pack_propagate() is achieving here. Something like # Don't resize the toolbar when mouse coordinates are shown or not shown. |
Sorry, something went wrong.
How about this: tk.Frame.__init__(self, master=window, borderwidth=2,
width=int(canvas.figure.bbox.width), height=50)
+ # Avoid message_label expanding the toolbar size, and in turn expanding
+ # the canvas size. When the user defines a small figure size(e.g. 2x2),
+ # this will cause:
+ # 1. Figure size that is bigger than the user's expectation.
+ # 2. When message_label is refreshed by mouse enter/leave, the canvas
+ # size will also be changed.
self.pack_propagate(False) |
Sorry, something went wrong.
|
Basically yes. A bit clearer
|
Sorry, something went wrong.
|
Did we also want to shrink the toolbar height, as noted in #28330 (comment)? |
Sorry, something went wrong.
I'd be in favor of that. |
Sorry, something went wrong.
Sorry, I used to think this display issue was simply due to the height of the toolbar. When the scaling is set to 150% on windows, canvas is resized to 300 * 300, but the toolbar is resized to 300 * 50. This makes the appearance on Windows as expected, but not on Linux. I'm not very clear on how rescaling works with TkAgg. Does anyone have experience with this? |
Sorry, something went wrong.
|
I'm not an expert on this, but the relevant starting point in our code base is here: |
Sorry, something went wrong.
|
I can't reproduce the toolbar issue on Linux regardless of DPI scaling setting. I'm going to merge as this does fix a long-standing problem. |
Sorry, something went wrong.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
PR summary
Closes #28330 .
Before: Left After: Right
PR checklist