[PR #14167] [MERGED] Fix clipped progress ring in tab when tab title is too long #29976

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14167
Author: @jonathan-meier
Created: 10/9/2022
Status: Merged
Merged: 10/10/2022
Merged by: @undefined

Base: mainHead: 8910-clipped-progress-ring


📝 Commits (1)

  • 086d5a6 Fix clipped progress ring in tab when tab title is too long

📊 Changes

2 files changed (+3 additions, -7 deletions)

View changed files

📝 src/cascadia/TerminalApp/TabHeaderControl.xaml (+1 -6)
📝 src/cascadia/TerminalApp/TerminalTab.cpp (+2 -1)

📄 Description

It turns out that the negative margin for the progress ring is causing
the clipping in case the tab title gets too long:

43dbbd590f/src/cascadia/TerminalApp/TabHeaderControl.xaml (L18-L27)

The negative margin was introduced in #8113 because the progress ring is
supposed to replace the tab icon but the TabView still reserves space
even if no icon is set (see
https://github.com/microsoft/terminal/pull/8133#issuecomment-739098014).
However, it is not actually the TabView reserving space even when
there is no icon, but a workaround for a crash in the
IconPathConverter that returns a BitmapIconSource with a nullptr
source instead of a nullptr IconSource:

43dbbd590f/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp (L143-L154)

The workaround in IconPathConverter could probably be removed as I did
not find any instance where it is still used in a way that could trigger
the mentioned crash, but I did not dare to just remove it as I do not
know enough about the code by far. Hence, I opted to just locally
instantiate the IconSource with a nullptr directly in TerminalTab.

Fixes #8910


🔄 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/14167 **Author:** [@jonathan-meier](https://github.com/jonathan-meier) **Created:** 10/9/2022 **Status:** ✅ Merged **Merged:** 10/10/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `8910-clipped-progress-ring` --- ### 📝 Commits (1) - [`086d5a6`](https://github.com/microsoft/terminal/commit/086d5a64e01cec22bcf4a0d73e43176d9449565d) Fix clipped progress ring in tab when tab title is too long ### 📊 Changes **2 files changed** (+3 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/TabHeaderControl.xaml` (+1 -6) 📝 `src/cascadia/TerminalApp/TerminalTab.cpp` (+2 -1) </details> ### 📄 Description It turns out that the negative margin for the progress ring is causing the clipping in case the tab title gets too long: https://github.com/microsoft/terminal/blob/43dbbd590fa4b46c37e9970415f8150d3c399598/src/cascadia/TerminalApp/TabHeaderControl.xaml#L18-L27 The negative margin was introduced in #8113 because the progress ring is supposed to replace the tab icon but the `TabView` still reserves space even if no icon is set (see https://github.com/microsoft/terminal/pull/8133#issuecomment-739098014). However, it is not actually the `TabView` reserving space even when there is no icon, but a workaround for a crash in the `IconPathConverter` that returns a `BitmapIconSource` with a `nullptr` source instead of a `nullptr` `IconSource`: https://github.com/microsoft/terminal/blob/43dbbd590fa4b46c37e9970415f8150d3c399598/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp#L143-L154 The workaround in `IconPathConverter` could probably be removed as I did not find any instance where it is still used in a way that could trigger the mentioned crash, but I did not dare to just remove it as I do not know enough about the code by far. Hence, I opted to just locally instantiate the `IconSource` with a `nullptr` directly in `TerminalTab`. Fixes #8910 --- <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:37: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#29976