You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notice this when I drag OS windows between my laptop monitor (retina display) and a not-so-high-resolution external monitor: the thickness of the borders, and the amount of padding, visibly doubles! For example, borders are normally 1 px thick on the low-res monitor and 2 px on the retina, and look fairly similar. But drag a window from retina to low-res, and the line is still 2 px thick, which looks too thick. If I create a new tab, borders on the new tab are 1 px and look normal. (Dragging in the opposite direction results in lines becoming visibly thinner.) The same issue applies to window padding.
My conclusion is that the conversion between points and pixels for the existing tab doesn't get updated when moving between monitors, but when a new tab is created, the conversion does get recalculated using the appropriate resolution.
I've made some modifications to my local copy of tabs.py, which fixed the problem for me. I'll post a PR in case it helps.
The text was updated successfully, but these errors were encountered:
Fix for kovidgoyal#2346: whenever relayout() is called, which happens when moving
between monitors (among other things), recompute the various window
padding/margin widths and border width and reset the current layout.
This ensures that these measurements look OK after moving between
monitors with different resolution.
(As an optimization perhaps we could check if the resolution actually
changed and do nothing if it didn't change, but maybe that's unnecessary
since this doesn't appear to be a a performance-critical spot.)