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

Add a setting for the unfocused tabRow background color #13049

Merged
73 commits merged into from
Jul 7, 2022

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented May 6, 2022

Adds tabRow.unfocusedBackground to the theme properties.

When provided, the window will use this ThemeColor as the color of the tab row when the window is inactive.

When omitted, the window will fall back to the default tab row color, {"key": "TabViewBackground"} from our App.xaml.

This actually helped validate #12992 quite a bit. I found a bunch of bugs concerning null colors, null objects. Json parsing is hard 😛

https://stackoverflow.com/questions/64694722/changing-themeresources-dynamically-in-uwp

That post looked SUPER promising. Problem is though, I CANNOT for the life of me
get that to work. Like, I can't get anything to `{Binding Brush, Mode=TwoWay,
Source={StaticResource TerminalBackground}}` to the `TerminalBackground` thing I
made there. I thought that was so clever.

I wanted an easy way to just change the value of a resource and have it update
the Titlebar, but since the Titlebar isn't a child of the TerminalPage, and this
binding thing didn't work, I think I'm at a dead end.
@zadjii-msft
Copy link
Member Author

theme-unfocused-tabRow-bg-accent
theme-unfocused-tabRow-bg-orangey
theme-unfocused-tabRow-bg-edge

@zadjii-msft zadjii-msft added this to the Terminal v1.15 milestone May 6, 2022
src/cascadia/TerminalApp/TerminalPage.cpp Outdated Show resolved Hide resolved
Base automatically changed from dev/migrie/fhl/theming-2022-prototype to main July 7, 2022 11:54
@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label Jul 7, 2022
@ghost ghost requested review from PankajBhojwani, carlos-zamora and DHowett July 7, 2022 13:26
Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

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

You weren't kidding, hiding the whitespace makes this pretty trivial haha.

Comment on lines +107 to +110
// NOTE: There is no canonical way to get the unfocused ACCENT titlebar
// color in Windows. Edge uses it's own heuristic, and in Windows 11,
// much of this logic is rapidly changing. We're not gonna mess with
// that, since it seems there's no good way to reverse engineer that.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should // TODO GH# this to track it?

Copy link
Member

Choose a reason for hiding this comment

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

agree

Copy link
Member Author

Choose a reason for hiding this comment

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

All the recommendations I got officially were basically "don't even try this", so I'm inclined to just say "nah". Filing an issue would result in it just being wont-fix'ed immediately (IMO)

@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jul 7, 2022
@ghost
Copy link

ghost commented Jul 7, 2022

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 024b9fc into main Jul 7, 2022
@ghost ghost deleted the dev/migrie/f/unfocused-tabRow-bg branch July 7, 2022 17:57
@ghost
Copy link

ghost commented Sep 13, 2022

🎉Windows Terminal Preview v1.16.252 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Area-Theming Anything related to the theming of elements of the window AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Second It's a PR that needs another sign-off Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support using different colors in the titlebar for focused/unfocused windows
4 participants