Skip to content
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

Light tab color causes unreadably dark foreground (text) color when the tab is not focused #13246

Closed
MikeTheGreat opened this issue Jun 8, 2022 · 2 comments · Fixed by #13689
Labels
Area-Theming Anything related to the theming of elements of the window Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@MikeTheGreat
Copy link
Contributor

Windows Terminal version

1.12.10982.0

Windows build number

Microsoft Windows [Version 10.0.19043.1706]

Other Software

None

Steps to reproduce

  1. Start MS terminal
  2. Open a total of 2+ tabs
  3. Make sure that you're running a 'Dark' theme
  4. Set the color of a tab to be bright enough that the foreground text switches to black (the 'Teal' option seems to work well - it's custom color is #05FFEE)
  5. Focus a tab (let's call it "Tab A") and bask in the readable text. The tab color is that nice, bright teal and the text has automatically been made black, an easy-to-read, high contrast color.
  6. Switch to a different tab. Notice that Tab A's tab color is now very dark / dim (which is a very reasonable way to convey to the user that the tab isn't currently focused). Notice also that the text color is still black, and thus unreadable.
  7. Look upon incredibly low contrast, unfocused Tab A and weep, for there is no possible way to read that text.

Expected Behavior

I'd love to be able to read the text on my unfocused tabs, even if I choose a light tab color for them.

I think what might solve this is: when a tab becomes unfocused and you dim the tab go back and adjust the foreground (text) color to be white.

Actual Behavior

Foreground color remains black.

I can't read black text on a really, really dark tab.

Oh boy is it hard to see what

Cue the weeping :)

@MikeTheGreat MikeTheGreat added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jun 8, 2022
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 8, 2022
@zadjii-msft
Copy link
Member

image

Shouldn't be too hard to set the unfocused text color based on the contrast with the unfocused color. Tricks will be:

  • Do we actually control the unfocused color in this scenario? Or are we just letting WinUI apply some default amount of transparency on top of the tab view item
  • Does the TabViewItem actually have a resource for it's unfocused text color, separate from the focused tab text color?

@zadjii-msft zadjii-msft added Help Wanted We encourage anyone to jump in on these. Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. Priority-3 A description (P3) Area-Theming Anything related to the theming of elements of the window labels Jun 8, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 8, 2022
@zadjii-msft zadjii-msft added this to the Terminal v1.16 milestone Jun 8, 2022
@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jun 13, 2022
@ghost ghost added the In-PR This issue has a related PR label Aug 16, 2022
zadjii-msft added a commit that referenced this issue Aug 31, 2022
Does what it sounds like on the label.

This is important, because when unset, the tab will use the active `Background` color to create an inactive BG, which maybe isn't what we want. Consider: 
- a bright cyan active BG,
- and `terminalBG` for the `tabRow` bg.

Without an unfocusedBackground setting, all the tabs will still appear cyan when unfocused, which is extra gross. 

As a judgement call, I made `terminalBackground` and `accent` use 30% opacity when set, to match the existing coloration. 

See also #13554. If we want to make the default theme `tab.background: terminalBackground`, we should make `tab.unfocusedBackground` transparent (`#00000000`) by default. Otherwise, a Campell (`#0c0c0c`) tab on _any_ tab row will still have a faint tab visible. 

* closes #13684
* closes #13246
* tested manually

This also does a lot of code shuffling, to get SettingsUI tabs to behave sensibly. We want those tabs to have (`#0c0c0c`, `#ffffff`) colored BGs for `terminalBackground` (see mail thread). 

We also don't want dark focused tabs colors, combined with light tab row colors, combined with transparent unfocused tabs, to result in unfocused tabs having white-on-white text. That's gross. So that's been added to this PR in b38b704.
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Needs-Tag-Fix Doesn't match tag requirements and removed In-PR This issue has a related PR labels Aug 31, 2022
@ghost
Copy link

ghost commented Sep 13, 2022

🎉This issue was addressed in #13689, which has now been successfully released as Windows Terminal Preview v1.16.252.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Theming Anything related to the theming of elements of the window Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants