-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Use ThemeLookup for the SUI bg too #14644
Conversation
@carlos-zamora can you check this out and make sure #14559 doesn't repro anymore? |
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.
probably that.... yea. Uhg. I'll take another spin through that and find the popup root. |
Hello @DHowett! 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 (
|
This might be Hard to do generically. Consider the code we use for the popups: auto themingLambda{ [this](const Windows::Foundation::IInspectable& sender, const RoutedEventArgs&) {
auto theme{ _settings.GlobalSettings().CurrentTheme() };
auto requestedTheme{ theme.RequestedTheme() };
auto element{ sender.try_as<winrt::Windows::UI::Xaml::FrameworkElement>() };
while (element)
{
element.RequestedTheme(requestedTheme);
element = element.Parent().try_as<winrt::Windows::UI::Xaml::FrameworkElement>();
}
} }; Popups belong to a different XAML root than the rest of the app. So we can go up the tree from the SUI and apply the requested theme to that whole tree, but we'll never get up to the popup root from the SUI. We'd need a literal popup to get there, and that we won't have access to, till it's opened. I'm inclined to resolve that sub-point as "meh". There may be a way to get to it, but "meh". |
Could it be a part of the Regardless, I'm ok with shipping this as-is. But we should have a bug tracking it imo :/ |
There's no popup when the template is applied; it only exists when the user interacts. I think this is a very deep well and a big waste of engineering effort to fix honestly. XAML has let us down. :) |
Oh right, I forgot Mike said that. Fair enough. |
🎉 Handy links: |
I can't exactly repro #14559. I suspect that's due to #14567 having been merged. This, however, seemed related. Without this, we'll use the App's
RequestedTheme
(the one that can't be changed at runtime), rather than the user'srequestedTheme
. That will do weird things, like make the BG of the SUI dark, with white expanders.I think this should close #14559.