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

Fix colored tab losing color when unselected #18306

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

carlos-zamora
Copy link
Member

@carlos-zamora carlos-zamora commented Dec 11, 2024

If we colored a tab, then switched to another tab, there's a bug that the unselected tab loses its color. This was introduced in PR #18109. This PR fixes that by actually applying the selected color to the tab (whoops). Additionally, I removed setting the "TabViewItemHeaderCloseButtonBackground" resource because it looked weird (see comment in PR).

Closes #18226

@carlos-zamora
Copy link
Member Author

Demo

If we don't remove the TabViewItemHeaderCloseButtonBackground resource...

{7166BE2C-03D2-4A36-AD8D-40EA045DD7F8}

v1.21 (stable)

{FB2965CA-4FE5-4120-8768-4BB807AD1EEC}
High Contrast:
{C9CA59F0-A47D-43D6-8D34-0B2F806F61CE}

main

{D2D766AA-0E40-4A8B-BAB2-74F33B77BF1D}
High Contrast:
{164FD35F-3682-43A3-BB54-FFF47690DAB3}

New Implementation

{0B5A37CD-649A-4173-A8E1-CEF95D0E25F4}
High Contrast:
{436827FD-5A73-4E2D-85AE-47D049E0BB8A}

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will fix the accent/terminalBackground issue, but I'll wait for confirmation!

@carlos-zamora
Copy link
Member Author

I think this will fix the accent/terminalBackground issue, but I'll wait for confirmation!

With colored (red) tabs:
{366B066F-14CA-42DA-85DF-895228488827}

Default colored tabs:
{A2F7E7F7-7830-4994-A0C2-A79961524877}

Looks good to me now! I'll add it to the PR body and merge the PR 😊

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. labels Dec 11, 2024
@carlos-zamora carlos-zamora merged commit 0b492ab into main Dec 11, 2024
20 checks passed
@carlos-zamora carlos-zamora deleted the dev/cazamor/a11y/hc/tab branch December 11, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Close button looks wrong on Accent Title Bar
4 participants