-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A very long title causes only half of the progress ring to be visible #8910
Comments
Okay, I'm testing this out. It doesn't look like it's the fallback icon that causes this. I think it's the title length. If you set the tab title to something really long, like That's real bizarre, because there's definitely space for it, but the tab view is still cropping it. Weird. |
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 #8133 (comment)). 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
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 #8133 (comment)). 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 (cherry picked from commit 21a9c55) Service-Card-Id: 86209056 Service-Version: 1.16
🎉This issue was addressed in #14167, which has now been successfully released as Handy links: |
Environment
Steps to reproduce
I was trying the
bcz.cmd
and found only half of the progress ring is shown.Here's my profile:
Expected behavior
The ring. The whole ring. The HALO.
Actual behavior
I'm only seeing this in the VS cmd profile. All other profiles work fine:
The text was updated successfully, but these errors were encountered: