-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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 pile of Theming nits fixes #13465
A pile of Theming nits fixes #13465
Conversation
til::color c; | ||
if (auto acrylic = brush.try_as<winrt::Windows::UI::Xaml::Media::AcrylicBrush>()) | ||
{ | ||
c = acrylic.TintColor(); | ||
} | ||
else if (auto solidColor = brush.try_as<winrt::Windows::UI::Xaml::Media::SolidColorBrush>()) | ||
{ | ||
c = solidColor.Color(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what will c
be initialized to if it's neither Acrylic nor SolidColor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I only have the same question as Dustin regarding til::color
.)
const auto bgProperty{ winrt::Windows::UI::Xaml::Controls::Panel::BackgroundProperty() }; | ||
RegisterPropertyChangedCallback(bgProperty, [weakThis = get_weak(), bgProperty](auto& /*sender*/, auto& e) { | ||
if (auto self{ weakThis.get() }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this very narrow case, you can capture this
directly. You will not be getting property change callbacks after you get destructed, afterall :)
Hello @zadjii-msft! Because this pull request has the 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 (
|
@@ -4101,27 +4100,25 @@ namespace winrt::TerminalApp::implementation | |||
|
|||
TitlebarBrush(acrylicBrush); | |||
} | |||
else if (theme.TabRow()) | |||
else if (const auto tabRowBg{ _activated ? theme.TabRow().Background() : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call is causing a crash on startup in the current build of main with the error Access violation reading location 0x0000000000000000
(just did a git pull, clean and tried to run)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I think the theme.TabRow() != nullptr
check should come before we try to access the Background
?
🎉 Handy links: |
The main fix here is for the caption button colors. If you had a dark OS/app theme, and a light titlebar, we'd end up with light glyphs, so the caption buttons would be impossible to find.
There's also a pile of nits from #12992 in here. Probably enough to close #13456 out, but I'll let Dustin be the judge.
Filing today, to get in for 1.16 selfhost (@DHowett)