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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4825
Author: @zadjii-msft
Created: 3/6/2020
Status: Merged
Merged: 3/11/2020
Merged by: @undefined

Base: masterHead: dev/migrie/b/2061-initial-size


📝 Commits (2)

  • 1bf1b0c this works for the tabs beneath the titlebar - I have no idea where the 6px are coming from
  • 5a44fa0 Sure okay 6px it is

📊 Changes

2 files changed (+37 additions, -2 deletions)

View changed files

📝 src/cascadia/TerminalApp/AppLogic.cpp (+35 -2)
📝 src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp (+2 -0)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/4825 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 3/6/2020 **Status:** ✅ Merged **Merged:** 3/11/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/migrie/b/2061-initial-size` --- ### 📝 Commits (2) - [`1bf1b0c`](https://github.com/microsoft/terminal/commit/1bf1b0c18c59ee1452690bf03beb9faeec8dadcd) this works for the tabs beneath the titlebar - I have no idea where the 6px are coming from - [`5a44fa0`](https://github.com/microsoft/terminal/commit/5a44fa06104dac91220b55003c254438adae55a0) Sure okay 6px it is ### 📊 Changes **2 files changed** (+37 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+35 -2) 📝 `src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp` (+2 -0) </details> ### 📄 Description ## 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:12:57 +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#25964