From 04dcd2be754d56eca5141c10d58130864cbae207 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 2 Sep 2021 15:00:38 -0500 Subject: [PATCH 01/11] add shield to titlebar --- src/cascadia/TerminalApp/TerminalPage.cpp | 37 ++++++++++++------- src/cascadia/TerminalApp/TerminalPage.h | 1 + src/cascadia/TerminalApp/TitlebarControl.xaml | 19 ++++++++-- 3 files changed, 41 insertions(+), 16 deletions(-) diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index 3e11a9eab55..ef8f1acb968 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -118,6 +118,29 @@ namespace winrt::TerminalApp::implementation _systemRowsToScroll = _ReadSystemRowsToScroll(); } + bool TerminalPage::IsElevated() const noexcept + { + // use C++11 magic statics to make sure we only do this once. + // This won't change over the lifetime of the application + + static const bool isElevated = []() { + // *** THIS IS A SINGLETON *** + auto result = false; + + // GH#2455 - Make sure to try/catch calls to Application::Current, + // because that _won't_ be an instance of TerminalApp::App in the + // LocalTests + try + { + result = ::winrt::Windows::UI::Xaml::Application::Current().as<::winrt::TerminalApp::App>().Logic().IsElevated(); + } + CATCH_LOG(); + return result; + }(); + + return isElevated; + } + void TerminalPage::Create() { // Hookup the key bindings @@ -128,19 +151,7 @@ namespace winrt::TerminalApp::implementation _tabView = _tabRow.TabView(); _rearranging = false; - // GH#2455 - Make sure to try/catch calls to Application::Current, - // because that _won't_ be an instance of TerminalApp::App in the - // LocalTests - auto isElevated = false; - try - { - // GH#3581 - There's a platform limitation that causes us to crash when we rearrange tabs. - // Xaml tries to send a drag visual (to wit: a screenshot) to the drag hosting process, - // but that process is running at a different IL than us. - // For now, we're disabling elevated drag. - isElevated = ::winrt::Windows::UI::Xaml::Application::Current().as<::winrt::TerminalApp::App>().Logic().IsElevated(); - } - CATCH_LOG(); + const auto isElevated = IsElevated(); if (_settings.GlobalSettings().UseAcrylicInTabRow()) { diff --git a/src/cascadia/TerminalApp/TerminalPage.h b/src/cascadia/TerminalApp/TerminalPage.h index d598d095556..22a32096ac5 100644 --- a/src/cascadia/TerminalApp/TerminalPage.h +++ b/src/cascadia/TerminalApp/TerminalPage.h @@ -107,6 +107,7 @@ namespace winrt::TerminalApp::implementation winrt::hstring WindowIdForDisplay() const noexcept; winrt::hstring WindowNameForDisplay() const noexcept; bool IsQuakeWindow() const noexcept; + bool IsElevated() const noexcept; WINRT_CALLBACK(PropertyChanged, Windows::UI::Xaml::Data::PropertyChangedEventHandler); diff --git a/src/cascadia/TerminalApp/TitlebarControl.xaml b/src/cascadia/TerminalApp/TitlebarControl.xaml index 919f59c7ec8..feadbf22d31 100644 --- a/src/cascadia/TerminalApp/TitlebarControl.xaml +++ b/src/cascadia/TerminalApp/TitlebarControl.xaml @@ -27,21 +27,34 @@ --> + + + + + + + + + Grid.Column="1" /> From 009ef144cd2788531795d79e0a3f3091cc1841d4 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 2 Sep 2021 15:17:45 -0500 Subject: [PATCH 02/11] move where the shield is hosted, make it actually dependent on elevation state --- src/cascadia/TerminalApp/TabRowControl.h | 4 + src/cascadia/TerminalApp/TabRowControl.idl | 4 +- src/cascadia/TerminalApp/TabRowControl.xaml | 193 ++++++++++-------- src/cascadia/TerminalApp/TerminalPage.cpp | 4 + src/cascadia/TerminalApp/TitlebarControl.xaml | 18 +- 5 files changed, 118 insertions(+), 105 deletions(-) diff --git a/src/cascadia/TerminalApp/TabRowControl.h b/src/cascadia/TerminalApp/TabRowControl.h index 6ffa605320b..1e571c605ee 100644 --- a/src/cascadia/TerminalApp/TabRowControl.h +++ b/src/cascadia/TerminalApp/TabRowControl.h @@ -4,6 +4,7 @@ #pragma once #include "winrt/Microsoft.UI.Xaml.Controls.h" +#include "../../cascadia/inc/cppwinrt_utils.h" #include "TabRowControl.g.h" @@ -16,6 +17,9 @@ namespace winrt::TerminalApp::implementation void OnNewTabButtonClick(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::Controls::SplitButtonClickEventArgs const& args); void OnNewTabButtonDrop(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::DragEventArgs const& e); void OnNewTabButtonDragOver(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::DragEventArgs const& e); + + WINRT_CALLBACK(PropertyChanged, Windows::UI::Xaml::Data::PropertyChangedEventHandler); + WINRT_OBSERVABLE_PROPERTY(bool, ShowUacShield, _PropertyChangedHandlers, false); }; } diff --git a/src/cascadia/TerminalApp/TabRowControl.idl b/src/cascadia/TerminalApp/TabRowControl.idl index 1415df9a255..6a6cdeb01c6 100644 --- a/src/cascadia/TerminalApp/TabRowControl.idl +++ b/src/cascadia/TerminalApp/TabRowControl.idl @@ -3,9 +3,11 @@ namespace TerminalApp { - [default_interface] runtimeclass TabRowControl : Windows.UI.Xaml.Controls.ContentPresenter + [default_interface] runtimeclass TabRowControl : Windows.UI.Xaml.Controls.ContentPresenter, + Windows.UI.Xaml.Data.INotifyPropertyChanged { TabRowControl(); Microsoft.UI.Xaml.Controls.TabView TabView { get; }; + Boolean ShowUacShield; } } diff --git a/src/cascadia/TerminalApp/TabRowControl.xaml b/src/cascadia/TerminalApp/TabRowControl.xaml index 802e7c529cc..1b20b32e215 100644 --- a/src/cascadia/TerminalApp/TabRowControl.xaml +++ b/src/cascadia/TerminalApp/TabRowControl.xaml @@ -11,96 +11,111 @@ xmlns:mux="using:Microsoft.UI.Xaml.Controls" mc:Ignorable="d"> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index ef8f1acb968..4881c2b1a43 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -278,6 +278,8 @@ namespace winrt::TerminalApp::implementation // Setup mouse vanish attributes SystemParametersInfoW(SPI_GETMOUSEVANISH, 0, &_shouldMouseVanish, false); + _tabRow.ShowUacShield(IsElevated()); + // Store cursor, so we can restore it, e.g., after mouse vanishing // (we'll need to adapt this logic once we make cursor context aware) try @@ -2097,6 +2099,8 @@ namespace winrt::TerminalApp::implementation // enabled application-wide, so we don't need to check it each time we // want to create an animation. WUX::Media::Animation::Timeline::AllowDependentAnimations(!_settings.GlobalSettings().DisableAnimations()); + + _tabRow.ShowUacShield(IsElevated()); } // This is a helper to aid in sorting commands by their `Name`s, alphabetically. diff --git a/src/cascadia/TerminalApp/TitlebarControl.xaml b/src/cascadia/TerminalApp/TitlebarControl.xaml index feadbf22d31..93cdb3d97af 100644 --- a/src/cascadia/TerminalApp/TitlebarControl.xaml +++ b/src/cascadia/TerminalApp/TitlebarControl.xaml @@ -27,34 +27,22 @@ --> - - - - - - - + Grid.Column="0" /> From 2acaedff56262e0f9c61c99557cee02b9b59e5a7 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 2 Sep 2021 16:13:29 -0500 Subject: [PATCH 03/11] Add a setting too --- src/cascadia/TerminalApp/TerminalPage.cpp | 4 ++-- src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp | 5 +++++ src/cascadia/TerminalSettingsModel/GlobalAppSettings.h | 1 + src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl | 1 + src/cascadia/TerminalSettingsModel/defaults.json | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index 4881c2b1a43..8a42e2cdb43 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -278,7 +278,7 @@ namespace winrt::TerminalApp::implementation // Setup mouse vanish attributes SystemParametersInfoW(SPI_GETMOUSEVANISH, 0, &_shouldMouseVanish, false); - _tabRow.ShowUacShield(IsElevated()); + _tabRow.ShowUacShield(IsElevated() && _settings.GlobalSettings().ShowAdminShield()); // Store cursor, so we can restore it, e.g., after mouse vanishing // (we'll need to adapt this logic once we make cursor context aware) @@ -2100,7 +2100,7 @@ namespace winrt::TerminalApp::implementation // want to create an animation. WUX::Media::Animation::Timeline::AllowDependentAnimations(!_settings.GlobalSettings().DisableAnimations()); - _tabRow.ShowUacShield(IsElevated()); + _tabRow.ShowUacShield(IsElevated() && _settings.GlobalSettings().ShowAdminShield()); } // This is a helper to aid in sorting commands by their `Name`s, alphabetically. diff --git a/src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp b/src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp index 31760ec7a5f..7a1b1575350 100644 --- a/src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp +++ b/src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp @@ -51,6 +51,7 @@ static constexpr std::string_view WindowingBehaviorKey{ "windowingBehavior" }; static constexpr std::string_view TrimBlockSelectionKey{ "trimBlockSelection" }; static constexpr std::string_view AlwaysShowTrayIconKey{ "alwaysShowTrayIcon" }; static constexpr std::string_view MinimizeToTrayKey{ "minimizeToTray" }; +static constexpr std::string_view ShowAdminShieldKey{ "showAdminShield" }; static constexpr std::string_view DebugFeaturesKey{ "debugFeatures" }; @@ -135,6 +136,7 @@ winrt::com_ptr GlobalAppSettings::Copy() const globals->_DetectURLs = _DetectURLs; globals->_MinimizeToTray = _MinimizeToTray; globals->_AlwaysShowTrayIcon = _AlwaysShowTrayIcon; + globals->_ShowAdminShield = _ShowAdminShield; globals->_UnparsedDefaultProfile = _UnparsedDefaultProfile; globals->_validDefaultProfile = _validDefaultProfile; @@ -331,6 +333,8 @@ void GlobalAppSettings::LayerJson(const Json::Value& json) JsonUtils::GetValueForKey(json, AlwaysShowTrayIconKey, _AlwaysShowTrayIcon); + JsonUtils::GetValueForKey(json, ShowAdminShieldKey, _ShowAdminShield); + // This is a helper lambda to get the keybindings and commands out of both // and array of objects. We'll use this twice, once on the legacy // `keybindings` key, and again on the newer `bindings` key. @@ -429,6 +433,7 @@ Json::Value GlobalAppSettings::ToJson() const JsonUtils::SetValueForKey(json, DetectURLsKey, _DetectURLs); JsonUtils::SetValueForKey(json, MinimizeToTrayKey, _MinimizeToTray); JsonUtils::SetValueForKey(json, AlwaysShowTrayIconKey, _AlwaysShowTrayIcon); + JsonUtils::SetValueForKey(json, ShowAdminShieldKey, _ShowAdminShield); // clang-format on json[JsonKey(ActionsKey)] = _actionMap->ToJson(); diff --git a/src/cascadia/TerminalSettingsModel/GlobalAppSettings.h b/src/cascadia/TerminalSettingsModel/GlobalAppSettings.h index 2ac936e699b..a934dd0a56f 100644 --- a/src/cascadia/TerminalSettingsModel/GlobalAppSettings.h +++ b/src/cascadia/TerminalSettingsModel/GlobalAppSettings.h @@ -101,6 +101,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation INHERITABLE_SETTING(Model::GlobalAppSettings, bool, DetectURLs, true); INHERITABLE_SETTING(Model::GlobalAppSettings, bool, MinimizeToTray, false); INHERITABLE_SETTING(Model::GlobalAppSettings, bool, AlwaysShowTrayIcon, false); + INHERITABLE_SETTING(Model::GlobalAppSettings, bool, ShowAdminShield, true); private: guid _defaultProfile; diff --git a/src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl b/src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl index a2145d3919d..ba5d31f1778 100644 --- a/src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl +++ b/src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl @@ -76,6 +76,7 @@ namespace Microsoft.Terminal.Settings.Model INHERITABLE_SETTING(Boolean, DetectURLs); INHERITABLE_SETTING(Boolean, MinimizeToTray); INHERITABLE_SETTING(Boolean, AlwaysShowTrayIcon); + INHERITABLE_SETTING(Boolean, ShowAdminShield); Windows.Foundation.Collections.IMapView ColorSchemes(); void AddColorScheme(ColorScheme scheme); diff --git a/src/cascadia/TerminalSettingsModel/defaults.json b/src/cascadia/TerminalSettingsModel/defaults.json index 9f942d82134..f1c0a1e843e 100644 --- a/src/cascadia/TerminalSettingsModel/defaults.json +++ b/src/cascadia/TerminalSettingsModel/defaults.json @@ -20,6 +20,7 @@ "showTerminalTitleInTitlebar": true, "tabWidthMode": "equal", "tabSwitcherMode": "inOrder", + "showAdminShield": true, // Miscellaneous "confirmCloseAllTabs": true, From 05679bc26a0e08a581c1c12c36a3cf68eca10938 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Tue, 14 Sep 2021 11:01:04 -0500 Subject: [PATCH 04/11] add a tooltip too --- src/cascadia/TerminalApp/Resources/en-US/Resources.resw | 3 +++ src/cascadia/TerminalApp/TabRowControl.xaml | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cascadia/TerminalApp/Resources/en-US/Resources.resw b/src/cascadia/TerminalApp/Resources/en-US/Resources.resw index 3f2aaea1878..a124877880a 100644 --- a/src/cascadia/TerminalApp/Resources/en-US/Resources.resw +++ b/src/cascadia/TerminalApp/Resources/en-US/Resources.resw @@ -715,4 +715,7 @@ Don't show again + + This Terminal window is running as an Administrator + diff --git a/src/cascadia/TerminalApp/TabRowControl.xaml b/src/cascadia/TerminalApp/TabRowControl.xaml index 1b20b32e215..868efa853b5 100644 --- a/src/cascadia/TerminalApp/TabRowControl.xaml +++ b/src/cascadia/TerminalApp/TabRowControl.xaml @@ -17,7 +17,8 @@ Grid.Column="0"> - Date: Tue, 14 Sep 2021 11:09:01 -0500 Subject: [PATCH 05/11] schema yes yes I know --- doc/cascadia/profiles.schema.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/cascadia/profiles.schema.json b/doc/cascadia/profiles.schema.json index 6b989a249b9..9a900ee8c3f 100644 --- a/doc/cascadia/profiles.schema.json +++ b/doc/cascadia/profiles.schema.json @@ -1272,6 +1272,11 @@ "description": "When set to true, the Terminal's tray icon will always be shown in the system tray.", "type": "boolean" }, + "showAdminShield": { + "default": "true", + "description": "When set to true, the Terminal's tab row will display a shield icon when the Terminal is running with administrator privileges", + "type": "boolean" + }, "useAcrylicInTabRow": { "default": "false", "description": "When set to true, the tab row will have an acrylic background with 50% opacity.", From 26aad5e26de5113cf250548c11ab3574f7d5b4df Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 16 Sep 2021 09:43:57 -0500 Subject: [PATCH 06/11] friendship ended with stackpanel ; grid is my best friend now --- src/cascadia/TerminalApp/TabRowControl.xaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cascadia/TerminalApp/TabRowControl.xaml b/src/cascadia/TerminalApp/TabRowControl.xaml index 868efa853b5..8a062fff3d3 100644 --- a/src/cascadia/TerminalApp/TabRowControl.xaml +++ b/src/cascadia/TerminalApp/TabRowControl.xaml @@ -11,7 +11,11 @@ xmlns:mux="using:Microsoft.UI.Xaml.Controls" mc:Ignorable="d"> - + + + + + @@ -27,6 +31,7 @@ - + From 71e6d62decb51458478d04b0ee033f8b50321f64 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 16 Sep 2021 11:17:35 -0500 Subject: [PATCH 07/11] huh, this clone doesn't auto-format --- src/cascadia/TerminalApp/TabRowControl.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cascadia/TerminalApp/TabRowControl.xaml b/src/cascadia/TerminalApp/TabRowControl.xaml index 8a062fff3d3..89c49165158 100644 --- a/src/cascadia/TerminalApp/TabRowControl.xaml +++ b/src/cascadia/TerminalApp/TabRowControl.xaml @@ -31,7 +31,7 @@ Date: Mon, 20 Sep 2021 12:26:40 -0500 Subject: [PATCH 08/11] dont need this --- src/cascadia/TerminalApp/TitlebarControl.xaml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cascadia/TerminalApp/TitlebarControl.xaml b/src/cascadia/TerminalApp/TitlebarControl.xaml index 93cdb3d97af..b98b75fa1f3 100644 --- a/src/cascadia/TerminalApp/TitlebarControl.xaml +++ b/src/cascadia/TerminalApp/TitlebarControl.xaml @@ -45,4 +45,3 @@ Grid.Column="2" HorizontalAlignment="Right" /> - From 134a4c32999a66890491b59306cebaf3e840fbce Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Mon, 20 Sep 2021 14:42:18 -0500 Subject: [PATCH 09/11] way better --- src/cascadia/TerminalApp/TabRowControl.h | 2 +- src/cascadia/TerminalApp/TabRowControl.idl | 2 +- src/cascadia/TerminalApp/TabRowControl.xaml | 194 +++++++++--------- src/cascadia/TerminalApp/TerminalPage.cpp | 4 +- src/cascadia/TerminalApp/TitlebarControl.xaml | 2 +- 5 files changed, 97 insertions(+), 107 deletions(-) diff --git a/src/cascadia/TerminalApp/TabRowControl.h b/src/cascadia/TerminalApp/TabRowControl.h index 1e571c605ee..1e4bd573f46 100644 --- a/src/cascadia/TerminalApp/TabRowControl.h +++ b/src/cascadia/TerminalApp/TabRowControl.h @@ -19,7 +19,7 @@ namespace winrt::TerminalApp::implementation void OnNewTabButtonDragOver(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::DragEventArgs const& e); WINRT_CALLBACK(PropertyChanged, Windows::UI::Xaml::Data::PropertyChangedEventHandler); - WINRT_OBSERVABLE_PROPERTY(bool, ShowUacShield, _PropertyChangedHandlers, false); + WINRT_OBSERVABLE_PROPERTY(bool, ShowElevationShield, _PropertyChangedHandlers, false); }; } diff --git a/src/cascadia/TerminalApp/TabRowControl.idl b/src/cascadia/TerminalApp/TabRowControl.idl index 6a6cdeb01c6..4dd1d37bd97 100644 --- a/src/cascadia/TerminalApp/TabRowControl.idl +++ b/src/cascadia/TerminalApp/TabRowControl.idl @@ -8,6 +8,6 @@ namespace TerminalApp { TabRowControl(); Microsoft.UI.Xaml.Controls.TabView TabView { get; }; - Boolean ShowUacShield; + Boolean ShowElevationShield; } } diff --git a/src/cascadia/TerminalApp/TabRowControl.xaml b/src/cascadia/TerminalApp/TabRowControl.xaml index 89c49165158..6debf2a0e2e 100644 --- a/src/cascadia/TerminalApp/TabRowControl.xaml +++ b/src/cascadia/TerminalApp/TabRowControl.xaml @@ -11,117 +11,107 @@ xmlns:mux="using:Microsoft.UI.Xaml.Controls" mc:Ignorable="d"> - - - - - - + + + Visibility="{x:Bind ShowElevationShield, Mode=OneWay}" /> + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index 107f13d3b10..33bc6a8d97b 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -278,7 +278,7 @@ namespace winrt::TerminalApp::implementation // Setup mouse vanish attributes SystemParametersInfoW(SPI_GETMOUSEVANISH, 0, &_shouldMouseVanish, false); - _tabRow.ShowUacShield(IsElevated() && _settings.GlobalSettings().ShowAdminShield()); + _tabRow.ShowElevationShield(IsElevated() && _settings.GlobalSettings().ShowAdminShield()); // Store cursor, so we can restore it, e.g., after mouse vanishing // (we'll need to adapt this logic once we make cursor context aware) @@ -2270,7 +2270,7 @@ namespace winrt::TerminalApp::implementation // want to create an animation. WUX::Media::Animation::Timeline::AllowDependentAnimations(!_settings.GlobalSettings().DisableAnimations()); - _tabRow.ShowUacShield(IsElevated() && _settings.GlobalSettings().ShowAdminShield()); + _tabRow.ShowElevationShield(IsElevated() && _settings.GlobalSettings().ShowAdminShield()); } // This is a helper to aid in sorting commands by their `Name`s, alphabetically. diff --git a/src/cascadia/TerminalApp/TitlebarControl.xaml b/src/cascadia/TerminalApp/TitlebarControl.xaml index b98b75fa1f3..919f59c7ec8 100644 --- a/src/cascadia/TerminalApp/TitlebarControl.xaml +++ b/src/cascadia/TerminalApp/TitlebarControl.xaml @@ -32,7 +32,6 @@ - @@ -45,3 +44,4 @@ Grid.Column="2" HorizontalAlignment="Right" /> + From 06a081eea03a87e4d0dfc8e15c12caf81b86c0ee Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Mon, 20 Sep 2021 14:43:13 -0500 Subject: [PATCH 10/11] dont need this --- src/cascadia/TerminalApp/TabRowControl.xaml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cascadia/TerminalApp/TabRowControl.xaml b/src/cascadia/TerminalApp/TabRowControl.xaml index 6debf2a0e2e..de226f45aae 100644 --- a/src/cascadia/TerminalApp/TabRowControl.xaml +++ b/src/cascadia/TerminalApp/TabRowControl.xaml @@ -11,7 +11,6 @@ xmlns:mux="using:Microsoft.UI.Xaml.Controls" mc:Ignorable="d"> - Date: Wed, 22 Sep 2021 16:27:35 -0500 Subject: [PATCH 11/11] use SystemControlForegroundBaseMediumBrush because it's more pleasant --- src/cascadia/TerminalApp/Resources/en-US/Resources.resw | 2 +- src/cascadia/TerminalApp/TabRowControl.xaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cascadia/TerminalApp/Resources/en-US/Resources.resw b/src/cascadia/TerminalApp/Resources/en-US/Resources.resw index b416d752657..421816f5849 100644 --- a/src/cascadia/TerminalApp/Resources/en-US/Resources.resw +++ b/src/cascadia/TerminalApp/Resources/en-US/Resources.resw @@ -716,6 +716,6 @@ Don't show again - This Terminal window is running as an Administrator + This Terminal window is running as Admin diff --git a/src/cascadia/TerminalApp/TabRowControl.xaml b/src/cascadia/TerminalApp/TabRowControl.xaml index de226f45aae..b3b0f58c332 100644 --- a/src/cascadia/TerminalApp/TabRowControl.xaml +++ b/src/cascadia/TerminalApp/TabRowControl.xaml @@ -26,6 +26,7 @@ Margin="9,4,0,0" FontFamily="Segoe MDL2 Assets" FontSize="16" + Foreground="{ThemeResource SystemControlForegroundBaseMediumBrush}" Glyph="" Visibility="{x:Bind ShowElevationShield, Mode=OneWay}" />