Open KalleOlaviNiemitalo opened 2 months ago
Huh, it seems the color of the progress indicator is coming from the highlight color in the Windows personalization settings…
That seems unreasonable to me; Terminal can't expect that color to have good contrast against both light and dark backgrounds.
AFAICT, the Terminal doesn't configure the color of the progress ring: https://github.com/microsoft/terminal/blob/27fff2c1a3e94a4257d8a8b61ad69318fbf36a92/src/cascadia/TerminalApp/TabHeaderControl.xaml#L18-L27
So… should I blame Microsoft.UI.Xaml, or is the Terminal violating some MUX guideline about background colors behind the progress ring control?
I have this gut feeling that this was fixed in Windows 11:
I bet the accent color logic got updated to be smarter in Win11
Yea, it looks like there was a lot of work in this area in Windows 11. Clearly these aren't all publicly accessible issue threads, but there is a lot of discussion in the win11 timeframe about accent colors:
I'm guessing that a backport to Win10 is highly unlikely. I have no idea how challenging this would be to workaround - possibly prohibitively hard. I don't think WinUI 2 lets us easily restyle the progress ring.
The last two screen shots in https://github.com/microsoft/terminal/issues/17475#issuecomment-2221600398 look like they are from WinUI Gallery and you have switched between dark and light theme. AFAICT, WinUI 3 chooses the default foreground color of the progress ring based on the theme, like this:
and the background color of the tab header does not affect that choice. So upgrading to WinUI 3 would not fix this bug; it would just make it possible for Terminal to set the foreground color of the progress ring, and TabBase::_ApplyTabColorOnUIThread would then have to be changed to set that, like it already sets the text color.
I guess it would be possible to copy the WinUI 3 ProgressRing implementation into Terminal and port it to WinUI 2, but that would increase the size of the binary package and complicate future maintenance.
FWIW, I was using the WinUI 2 gallery for those screenshots 😉
I'm thinking:
Windows Terminal version
1.20.11381.0
Windows build number
10.0.19045.4529
Other Software
No response
Steps to reproduce
Configure the terminal to use the light theme (not legacy), and a tab bar separate from the title bar. Open a PowerShell tab and run a command to output the OSC that sets 50% progress:
"`e]9;4;1;50`e\"
Do the same in another tab.Expected Behavior
The progress indicators in the tab bar should have good contrast so that I can see how much progress has been made.
Actual Behavior
The progress indicator of the inactive tab is too light and doesn't have enough contrast to the light background:
![image](https://github.com/microsoft/terminal/assets/46201428/5e68fa33-16fc-44ea-8a8c-c61c0884af3a)
Compare to the dark theme, where both progress indicators have adequate contrast:![image](https://github.com/microsoft/terminal/assets/46201428/407b68f2-fb8c-474c-80e0-6ab7bddbcb51)