[PR #4825] Correct for the size of the tabs when calculating our initial window size #25969

Open
opened 2026-01-31 09:12:59 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/4825

State: closed
Merged: Yes


Summary of the Pull Request

This fixes our calculation for the initial size of the window. WE weren't accounting for the height of the tabs, so the initialRows was consistently wrong.

PR Checklist

Detailed Description of the Pull Request / Additional comments

For the tabs below the titlebar case, there's 6px (unscaled) of space that I cannot account for. I seriously have no idea where it's coming from. When we end up creating the first TermControl after startup, there's an inexplicable 6*scale difference between the height of the tabContent and the SwapChainPanel's size.

Validation Steps Performed

Checked all six of the following cases:

  • 1.0 DPI scaling, Tabs in Titlebar
  • 1.25 DPI scaling, Tabs in Titlebar
  • 1.0 DPI scaling, Tabs NOT in Titlebar, always show tabs
  • 1.0 DPI scaling, Tabs NOT in Titlebar, DON'T always show tabs
  • 1.25 DPI scaling, Tabs NOT in Titlebar, always show tabs
  • 1.25 DPI scaling, Tabs NOT in Titlebar, DON'T always show tabs
**Original Pull Request:** https://github.com/microsoft/terminal/pull/4825 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request This fixes our calculation for the initial size of the window. WE weren't accounting for the height of the tabs, so the `initialRows` was consistently wrong. ## PR Checklist * [x] Closes #2061 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments For the tabs below the titlebar case, there's 6px (unscaled) of space that I cannot account for. I seriously have no idea where it's coming from. When we end up creating the first `TermControl` after startup, there's an inexplicable `6*scale` difference between the height of the `tabContent` and the `SwapChainPanel`'s size. ## Validation Steps Performed Checked all six of the following cases: * 1.0 DPI scaling, Tabs in Titlebar * 1.25 DPI scaling, Tabs in Titlebar * 1.0 DPI scaling, Tabs NOT in Titlebar, always show tabs * 1.0 DPI scaling, Tabs NOT in Titlebar, DON'T always show tabs * 1.25 DPI scaling, Tabs NOT in Titlebar, always show tabs * 1.25 DPI scaling, Tabs NOT in Titlebar, DON'T always show tabs
claunia added the pull-request label 2026-01-31 09:12:59 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25969