mirror of
https://github.com/microsoft/terminal.git
synced 2026-02-10 05:37:34 +00:00
the other part
This commit is contained in:
@@ -2658,9 +2658,14 @@ namespace winrt::TerminalApp::implementation
|
||||
Media::Imaging::BitmapImage image(imageUri);
|
||||
b.ImageSource(image);
|
||||
_tabContent.Background(b);
|
||||
}
|
||||
|
||||
b.Stretch(newAppearance.BackgroundImageStretchMode());
|
||||
b.Opacity(newAppearance.BackgroundImageOpacity());
|
||||
// Pull this into a separate block. If the image didn't change, but the
|
||||
// properties of the image did, we should still update them.
|
||||
if (const auto newBrush{ _tabContent.Background().try_as<Media::ImageBrush>() })
|
||||
{
|
||||
newBrush.Stretch(newAppearance.BackgroundImageStretchMode());
|
||||
newBrush.Opacity(newAppearance.BackgroundImageOpacity());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2694,14 +2699,6 @@ namespace winrt::TerminalApp::implementation
|
||||
profileGuidSettingsMap.insert_or_assign(newProfile.Guid(), std::pair{ newProfile, nullptr });
|
||||
}
|
||||
|
||||
if (const auto focusedTab{ _GetFocusedTabImpl() })
|
||||
{
|
||||
if (const auto profile{ focusedTab->GetFocusedProfile() })
|
||||
{
|
||||
_SetBackgroundImage(profile.DefaultAppearance());
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& tab : _tabs)
|
||||
{
|
||||
if (auto terminalTab{ _GetTerminalTabImpl(tab) })
|
||||
@@ -2747,6 +2744,14 @@ namespace winrt::TerminalApp::implementation
|
||||
tabImpl->SetActionMap(_settings.ActionMap());
|
||||
}
|
||||
|
||||
if (const auto focusedTab{ _GetFocusedTabImpl() })
|
||||
{
|
||||
if (const auto profile{ focusedTab->GetFocusedProfile() })
|
||||
{
|
||||
_SetBackgroundImage(profile.DefaultAppearance());
|
||||
}
|
||||
}
|
||||
|
||||
// repopulate the new tab button's flyout with entries for each
|
||||
// profile, which might have changed
|
||||
_UpdateTabWidthMode();
|
||||
|
||||
Reference in New Issue
Block a user