Bug summary
NavigationToolbar2Tk._Spacer sets the spacer size to 18p and the padx to 3p, but _rescale sets them to 22p and 4p respectively.
Code for reproduction
# in ipython, tk backend
from pylab import *
plot(); show()
# In theory this should be triggered upon moving the window
# to a monitor with a different dpi, which I don't have,
# but one can also call _rescale manually
gcf().canvas.toolbar._rescale()
Actual outcome
The spacer becomes larger and with more space around it.
Expected outcome
No change to spacer size(?)
Additional information
I stumbled upon this while considering whether we could entirely get rid of _Spacer() and just add a RIDGE Frame instead and rely on _rescale() to set the size of the spacer as needed; the idea being to avoid the call to a private method in the https://matplotlib.org/stable/gallery/user_interfaces/mplcvd.html example while also not adding a new method for adding spacers.
Operating system
No response
Matplotlib Version
3.7
Matplotlib Backend
tkagg
Python version
3.11
Jupyter version
No response
Installation
git checkout
Bug summary
NavigationToolbar2Tk._Spacer sets the spacer size to 18p and the padx to 3p, but _rescale sets them to 22p and 4p respectively.
Code for reproduction
Actual outcome
The spacer becomes larger and with more space around it.
Expected outcome
No change to spacer size(?)
Additional information
I stumbled upon this while considering whether we could entirely get rid of _Spacer() and just add a RIDGE Frame instead and rely on _rescale() to set the size of the spacer as needed; the idea being to avoid the call to a private method in the https://matplotlib.org/stable/gallery/user_interfaces/mplcvd.html example while also not adding a new method for adding spacers.
Operating system
No response
Matplotlib Version
3.7
Matplotlib Backend
tkagg
Python version
3.11
Jupyter version
No response
Installation
git checkout