Window size should snap to a multiple of font width/height #6869

Closed
opened 2026-01-31 00:49:20 +00:00 by claunia · 2 comments
Owner

Originally created by @randomascii on GitHub (Mar 14, 2020).

The window size should snap to a multiple of the font width/height

I find it annoying and aesthetically displeasing when the cmd.exe window is not a multiple of the font height, leaving black pixels at the bottom. The new terminal is a chance to fix this issue by clamping the window sizes to multiples of the font size. Right now the behavior is arguably worse because not only is no clamping to logical sizes done, there is also a significant border between the text and the window edge, wasting even more space.

Proposed technical implementation details (optional)

The message handler for WM_SIZE can detect and reject invalid sizes either during live dragging or after dragging finishes so that the window is always a good size.

Originally created by @randomascii on GitHub (Mar 14, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: Yes! 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> The window size should snap to a multiple of the font width/height I find it annoying and aesthetically displeasing when the cmd.exe window is not a multiple of the font height, leaving black pixels at the bottom. The new terminal is a chance to fix this issue by clamping the window sizes to multiples of the font size. Right now the behavior is arguably worse because not only is no clamping to logical sizes done, there is also a significant border between the text and the window edge, wasting even more space. # Proposed technical implementation details (optional) The message handler for WM_SIZE can detect and reject invalid sizes either during live dragging or after dragging finishes so that the window is always a good size.
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 00:49:21 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 14, 2020):

So! I’ve got good news on this one.

  1. We shipped grid snapping resize in 0.9, off by default, behind a setting named snapToGridOnResize (PR #3181).

    • It’ll be on by default in 0.10 (Issue #4349)
  2. You can configure the padding of any profile; you can even set it to 0 if you’re concerned about us wasting space.

Since we’ve already got this covered, I’m going to call this one a /dupe of #4349 (the issue for turning snapping on by default) since that’ll have the desired behavior.

@DHowett-MSFT commented on GitHub (Mar 14, 2020): So! I’ve got good news on this one. 1. We shipped grid snapping resize in 0.9, off by default, behind a setting named `snapToGridOnResize` (PR #3181). * It’ll be on by default in 0.10 (Issue #4349) 2. You can configure the `padding` of any profile; you can even set it to `0` if you’re concerned about us wasting space. Since we’ve already got this covered, I’m going to call this one a /dupe of #4349 (the issue for turning snapping on by default) since that’ll have the desired behavior.
Author
Owner

@ghost commented on GitHub (Mar 14, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Mar 14, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6869