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
{{ message }}
Repository navigation
Inconsistent gutters/margins on HiDPI displays with snapToGridOnResize #4175
It looks like on my 200% scale device it's snapping at the half-grid.
A 50x15 window at 150% scale with Ctrl+Shift+A:
After resizing the window to 51x15:
Reacted by Jonathan Trull, lucy, ethan-enhe, ing-aleksandar, Aleksandar Milosavljevic, Soumik, Marius, egorlepa, Vasyl Tyshchuk, Roman Vayser and 2 more
At 125% scaling it seems to have a variable padding at the bottom. As you size the window up from the bottom, one line at a time, it actually shrinks the window by some lesser amount - probably 80% of a line.
Even at 100% it is not totally reliable. When you expand the height of the window the newly revealed line will sometimes not render (even though there is content there) but if you scroll up and down the content will appear.
changed the title [-]`snapToGridOnResize` gets grid size wrong on HiDPI devices[/-][+]Inconsistent gutters/margins on HiDPI displays with `snapToGridOnResize`[/+]on Aug 30, 2023
Pretty sure this just doesn't account for DIPs vs pixels at all. Never has. I'd reckon that dimension is in DIPs and fontSize is in pixels. Someone could pretty easily fix that
I'm having this problem as well on a 4k display.
Used a white background to show the borders.
Is there any way to totally get rid of the borders from all sides?
Seeing that this is open for almost a year, is this still being worked on? As it seems its still relevant. #17721 mentions 1.23 as a potential candidate that adresses this, am I understanding correctly?
Hi! I'd like to investigate and work on this issue as my first contribution to Windows Terminal.
I'll first reproduce the issue, inspect the current SnapDimensionToGrid implementation, and investigate the DIP-versus-pixel scaling behaviour before proposing a fix.
Please let me know if there are any specific considerations before I proceed. Thank you!
Activity
randomascii commentedon Mar 28, 2020
At 125% scaling it seems to have a variable padding at the bottom. As you size the window up from the bottom, one line at a time, it actually shrinks the window by some lesser amount - probably 80% of a line.
Even at 100% it is not totally reliable. When you expand the height of the window the newly revealed line will sometimes not render (even though there is content there) but if you scroll up and down the content will appear.
14 remaining items
DHowett commentedon Aug 22, 2023
egorlepa commentedon Aug 25, 2023
[-]`snapToGridOnResize` gets grid size wrong on HiDPI devices[/-][+]Inconsistent gutters/margins on HiDPI displays with `snapToGridOnResize`[/+]zadjii-msft commentedon Aug 31, 2023
terminal/src/cascadia/TerminalControl/TermControl.cpp
Lines 2415 to 2433 in 636be7e
Pretty sure this just doesn't account for DIPs vs pixels at all. Never has. I'd reckon that
dimensionis in DIPs andfontSizeis in pixels. Someone could pretty easily fix thatrp1231 commentedon Feb 22, 2024
I'm having this problem as well on a 4k display.
Used a white background to show the borders.
Is there any way to totally get rid of the borders from all sides?
MarcoBuess commentedon Jan 7, 2025
Seeing that this is open for almost a year, is this still being worked on? As it seems its still relevant. #17721 mentions
1.23as a potential candidate that adresses this, am I understanding correctly?Ali-Nu commentedon Jan 7, 2025
B1LLP4RK commentedon Jul 9, 2025
I'm still waiting for this to be fixed
FY0u11 commentedon Oct 15, 2025
5 years. Any progress on this?
kahilah commentedon Dec 29, 2025
Can confirm, still an issue with latest terminal version.
shivam-dhir commentedon Jan 22, 2026
VishalGujela commentedon Mar 19, 2026
I would like to contribute on this as my first opensource project.
Can i?
aaryanm1208-ship-it commentedon Nov 7, 2026
Hi! I'd like to investigate and work on this issue as my first contribution to Windows Terminal.
I'll first reproduce the issue, inspect the current
SnapDimensionToGridimplementation, and investigate the DIP-versus-pixel scaling behaviour before proposing a fix.Please let me know if there are any specific considerations before I proceed. Thank you!
DHowett commentedon Nov 8, 2026
Follow our AI guidelines and we won't have a problem.