Skip to content

Commit

Permalink
really, no good progress here. It's rough
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Mar 28, 2022
1 parent 9eff0a2 commit 44112fc
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cascadia/TerminalApp/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@
<!--<Setter Property="Background" Value="{ThemeResource TabViewBackground}" />-->
<Setter Property="Background" Value="{StaticResource TerminalBackgroundBrush}" />
</Style>
<Binding x:Name="Binder"
Mode="OneWay"
Path="Brush" />
<Style x:Name="AutoTerminalBackgroundStyle"
TargetType="Grid">
<Setter Property="Background" Value="{Binding Brush, Mode=TwoWay, Source={StaticResource TerminalBackground}}" />
<!--<Setter Property="Background" Value="{ThemeResource TabViewBackground}" />-->
<!-- <Setter Property="Background" Value="{StaticResource TerminalBackgroundBrush}" /> -->
</Style>

<!--
We need to manually create the error text brush as a
Expand Down
14 changes: 14 additions & 0 deletions src/cascadia/WindowsTerminal/AppHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,20 @@ void AppHost::_updateTheme()
// bgBrush.Color(backgroundColor);
// const auto style{ _app.Resources().Lookup(winrt::box_value(L"TerminalBackgroundStyle")).as<winrt::Windows::UI::Xaml::Style>() };
// titlebar.Style(style);
//winrt::Windows::UI::Xaml::Data::Binding b{};
//// TerminalBackground
//auto bg{ _app.Resources().Lookup(winrt::box_value(L"TerminalBackground")).as<winrt::TerminalApp::TerminalBackground>() };

//b.Source(bg);
//b.Mode(Xaml::Data::BindingMode::OneWay);
//b.Path(Xaml::PropertyPath{ L"Brush" });
//Xaml::Controls::Grid::
//winrt::Windows::UI::Xaml::Controls::IPanelStatics s{};
//titlebar.SetBinding(s.BackgroundProperty(), b);

auto bg{ _app.Resources().Lookup(winrt::box_value(L"TerminalBackground")).as<winrt::TerminalApp::TerminalBackground>() };
auto binder{ _app.Resources().Lookup(winrt::box_value(L"Binder")).as<winrt::Windows::UI::Xaml::Data::Binding>() };

}
}

Expand Down
1 change: 1 addition & 0 deletions src/cascadia/WindowsTerminal/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Module Name:
#include <winrt/Windows.UI.Xaml.Controls.h>
#include <winrt/Windows.UI.Xaml.Controls.Primitives.h>
#include <winrt/Windows.ui.xaml.media.h>
#include <winrt/Windows.ui.xaml.data.h>
#include <winrt/Windows.ApplicationModel.h>
#include <winrt/Windows.ApplicationModel.Resources.Core.h>
#include <winrt/Windows.UI.Composition.h>
Expand Down

1 comment on commit 44112fc

@github-actions

This comment was marked as outdated.

Please sign in to comment.