From 0f3c340f93d8c55187e08497af6507fcdae13d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=84=A2=EF=B8=8F?= Date: Sun, 10 Sep 2023 17:37:15 +0200 Subject: [PATCH 1/4] Enum IconStyle Adding enum iconstyle for hiding the icon in the tab --- src/cascadia/LocalTests_SettingsModel/ThemeTests.cpp | 5 +++-- src/cascadia/TerminalApp/TabManagement.cpp | 4 ++-- src/cascadia/TerminalApp/TerminalTab.cpp | 9 +++++++-- src/cascadia/TerminalApp/TerminalTab.h | 2 +- src/cascadia/TerminalSettingsModel/MTSMSettings.h | 7 ++++--- .../TerminalSettingsSerializationHelpers.h | 8 ++++++++ src/cascadia/TerminalSettingsModel/Theme.idl | 8 ++++++++ 7 files changed, 33 insertions(+), 10 deletions(-) diff --git a/src/cascadia/LocalTests_SettingsModel/ThemeTests.cpp b/src/cascadia/LocalTests_SettingsModel/ThemeTests.cpp index 4e3bdacc254..3ed682ff2ce 100644 --- a/src/cascadia/LocalTests_SettingsModel/ThemeTests.cpp +++ b/src/cascadia/LocalTests_SettingsModel/ThemeTests.cpp @@ -42,7 +42,7 @@ namespace SettingsModelLocalTests TEST_METHOD(ParseNullWindowTheme); TEST_METHOD(ParseThemeWithNullThemeColor); TEST_METHOD(InvalidCurrentTheme); - + static Core::Color rgb(uint8_t r, uint8_t g, uint8_t b) noexcept { return Core::Color{ r, g, b, 255 }; @@ -60,7 +60,8 @@ namespace SettingsModelLocalTests "tabRow": { "background": "#FFFF8800", - "unfocusedBackground": "#FF8844" + "unfocusedBackground": "#FF8844", + "iconStyle": "default" }, "window": { diff --git a/src/cascadia/TerminalApp/TabManagement.cpp b/src/cascadia/TerminalApp/TabManagement.cpp index 02bd8940746..2d6bfc326d1 100644 --- a/src/cascadia/TerminalApp/TabManagement.cpp +++ b/src/cascadia/TerminalApp/TabManagement.cpp @@ -176,7 +176,7 @@ namespace winrt::TerminalApp::implementation { if (!profile.Icon().empty()) { - newTabImpl->UpdateIcon(profile.Icon()); + newTabImpl->UpdateIcon(profile.Icon(), _settings.GlobalSettings().CurrentTheme().Tab().IconStyle()); } } @@ -241,7 +241,7 @@ namespace winrt::TerminalApp::implementation { if (const auto profile = tab.GetFocusedProfile()) { - tab.UpdateIcon(profile.Icon()); + tab.UpdateIcon(profile.Icon(), _settings.GlobalSettings().CurrentTheme().Tab().IconStyle()); } } diff --git a/src/cascadia/TerminalApp/TerminalTab.cpp b/src/cascadia/TerminalApp/TerminalTab.cpp index 864ff6aad4e..b8cbc2dd74a 100644 --- a/src/cascadia/TerminalApp/TerminalTab.cpp +++ b/src/cascadia/TerminalApp/TerminalTab.cpp @@ -278,16 +278,21 @@ namespace winrt::TerminalApp::implementation // - iconPath: The new path string to use as the IconPath for our TabViewItem // Return Value: // - - void TerminalTab::UpdateIcon(const winrt::hstring iconPath) + void TerminalTab::UpdateIcon(const winrt::hstring iconPath, const winrt::Microsoft::Terminal::Settings::Model::IconStyle& iconStyle) { ASSERT_UI_THREAD(); + if (iconStyle == IconStyle::Hidden) + { + // we want to return early here + HideIcon(true); + return; + } // Don't reload our icon if it hasn't changed. if (iconPath == _lastIconPath) { return; } - _lastIconPath = iconPath; // If the icon is currently hidden, just return here (but only after setting _lastIconPath to the new path diff --git a/src/cascadia/TerminalApp/TerminalTab.h b/src/cascadia/TerminalApp/TerminalTab.h index 72ec8d8bac2..4cb2918e89a 100644 --- a/src/cascadia/TerminalApp/TerminalTab.h +++ b/src/cascadia/TerminalApp/TerminalTab.h @@ -41,7 +41,7 @@ namespace winrt::TerminalApp::implementation std::shared_ptr newPane); void ToggleSplitOrientation(); - void UpdateIcon(const winrt::hstring iconPath); + void UpdateIcon(const winrt::hstring iconPath, const winrt::Microsoft::Terminal::Settings::Model::IconStyle& iconStyle); void HideIcon(const bool hide); void ShowBellIndicator(const bool show); diff --git a/src/cascadia/TerminalSettingsModel/MTSMSettings.h b/src/cascadia/TerminalSettingsModel/MTSMSettings.h index 6c7b08649f9..e5e5c87c5eb 100644 --- a/src/cascadia/TerminalSettingsModel/MTSMSettings.h +++ b/src/cascadia/TerminalSettingsModel/MTSMSettings.h @@ -151,7 +151,8 @@ Author(s): X(winrt::Microsoft::Terminal::Settings::Model::ThemeColor, Background, "background", nullptr) \ X(winrt::Microsoft::Terminal::Settings::Model::ThemeColor, UnfocusedBackground, "unfocusedBackground", nullptr) -#define MTSM_THEME_TAB_SETTINGS(X) \ - X(winrt::Microsoft::Terminal::Settings::Model::ThemeColor, Background, "background", nullptr) \ - X(winrt::Microsoft::Terminal::Settings::Model::ThemeColor, UnfocusedBackground, "unfocusedBackground", nullptr) \ +#define MTSM_THEME_TAB_SETTINGS(X) \ + X(winrt::Microsoft::Terminal::Settings::Model::ThemeColor, Background, "background", nullptr) \ + X(winrt::Microsoft::Terminal::Settings::Model::ThemeColor, UnfocusedBackground, "unfocusedBackground", nullptr) \ + X(winrt::Microsoft::Terminal::Settings::Model::IconStyle, IconStyle, "iconStyle", winrt::Microsoft::Terminal::Settings::Model::IconStyle::Default) \ X(winrt::Microsoft::Terminal::Settings::Model::TabCloseButtonVisibility, ShowCloseButton, "showCloseButton", winrt::Microsoft::Terminal::Settings::Model::TabCloseButtonVisibility::Always) diff --git a/src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h b/src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h index 0dc91e30b11..293f4b4473f 100644 --- a/src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h +++ b/src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h @@ -652,6 +652,14 @@ JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::Model::TabCloseButtonVi }; }; +JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::Model::IconStyle){ + JSON_MAPPINGS(3) = { + pair_type{ "default", ValueType::Default }, + pair_type{ "hidden", ValueType::Hidden }, + pair_type{ "monochrome", ValueType::Monochrome }, + }; +}; + // Possible ScrollToMarkDirection values JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Control::ScrollToMarkDirection) { diff --git a/src/cascadia/TerminalSettingsModel/Theme.idl b/src/cascadia/TerminalSettingsModel/Theme.idl index f7f041a9dda..830bafef2a2 100644 --- a/src/cascadia/TerminalSettingsModel/Theme.idl +++ b/src/cascadia/TerminalSettingsModel/Theme.idl @@ -4,6 +4,13 @@ namespace Microsoft.Terminal.Settings.Model { + enum IconStyle + { + Default, + Hidden, + Monochrome + }; + enum ThemeColorType { Accent, @@ -63,6 +70,7 @@ namespace Microsoft.Terminal.Settings.Model ThemeColor Background { get; }; ThemeColor UnfocusedBackground { get; }; TabCloseButtonVisibility ShowCloseButton { get; }; + IconStyle IconStyle { get; }; } [default_interface] runtimeclass Theme : Windows.Foundation.IStringable { From 193fb60c1ac2214841387e1bd6b7fed63a7678dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=84=A2=EF=B8=8F?= Date: Mon, 11 Sep 2023 19:10:24 +0200 Subject: [PATCH 2/4] Adding support for dynamic changing configuration Also added support for monochrome configuration. --- src/cascadia/TerminalApp/SettingsTab.cpp | 2 +- src/cascadia/TerminalApp/TerminalTab.cpp | 28 +++++++++++-------- src/cascadia/TerminalApp/TerminalTab.h | 1 + .../IconPathConverter.cpp | 27 ++++++++++-------- .../TerminalSettingsModel/IconPathConverter.h | 2 +- .../IconPathConverter.idl | 2 +- 6 files changed, 36 insertions(+), 26 deletions(-) diff --git a/src/cascadia/TerminalApp/SettingsTab.cpp b/src/cascadia/TerminalApp/SettingsTab.cpp index 107bbb45732..1c9c4049f66 100644 --- a/src/cascadia/TerminalApp/SettingsTab.cpp +++ b/src/cascadia/TerminalApp/SettingsTab.cpp @@ -114,7 +114,7 @@ namespace winrt::TerminalApp::implementation // The TabViewItem Icon needs MUX while the IconSourceElement in the CommandPalette needs WUX... Icon(winrt::hstring{ glyph }); - TabViewItem().IconSource(IconPathConverter::IconSourceMUX(glyph)); + TabViewItem().IconSource(IconPathConverter::IconSourceMUX(glyph, false)); } winrt::Windows::UI::Xaml::Media::Brush SettingsTab::_BackgroundBrush() diff --git a/src/cascadia/TerminalApp/TerminalTab.cpp b/src/cascadia/TerminalApp/TerminalTab.cpp index b8cbc2dd74a..5e8b3af680c 100644 --- a/src/cascadia/TerminalApp/TerminalTab.cpp +++ b/src/cascadia/TerminalApp/TerminalTab.cpp @@ -282,18 +282,13 @@ namespace winrt::TerminalApp::implementation { ASSERT_UI_THREAD(); - if (iconStyle == IconStyle::Hidden) - { - // we want to return early here - HideIcon(true); - return; - } - // Don't reload our icon if it hasn't changed. - if (iconPath == _lastIconPath) + // Don't reload our icon and iconStyle hasn't changed. + if (iconPath == _lastIconPath && iconStyle == _lastIconStyle) { return; } _lastIconPath = iconPath; + _lastIconStyle = iconStyle; // If the icon is currently hidden, just return here (but only after setting _lastIconPath to the new path // for when we show the icon again) @@ -302,9 +297,18 @@ namespace winrt::TerminalApp::implementation return; } - // The TabViewItem Icon needs MUX while the IconSourceElement in the CommandPalette needs WUX... - Icon(_lastIconPath); - TabViewItem().IconSource(IconPathConverter::IconSourceMUX(_lastIconPath)); + if (iconStyle == IconStyle::Hidden) + { + // The TabViewItem Icon needs MUX while the IconSourceElement in the CommandPalette needs WUX... + Icon({}); + TabViewItem().IconSource(IconSource{ nullptr }); + } + else + { + Icon(_lastIconPath); + bool isMonochrome = iconStyle == IconStyle::Monochrome; + TabViewItem().IconSource(IconPathConverter::IconSourceMUX(_lastIconPath, isMonochrome)); + } } // Method Description: @@ -326,7 +330,7 @@ namespace winrt::TerminalApp::implementation else { Icon(_lastIconPath); - TabViewItem().IconSource(IconPathConverter::IconSourceMUX(_lastIconPath)); + TabViewItem().IconSource(IconPathConverter::IconSourceMUX(_lastIconPath, _lastIconStyle == IconStyle::Monochrome)); } _iconHidden = hide; } diff --git a/src/cascadia/TerminalApp/TerminalTab.h b/src/cascadia/TerminalApp/TerminalTab.h index 4cb2918e89a..6ea70207e8f 100644 --- a/src/cascadia/TerminalApp/TerminalTab.h +++ b/src/cascadia/TerminalApp/TerminalTab.h @@ -110,6 +110,7 @@ namespace winrt::TerminalApp::implementation Windows::UI::Xaml::Controls::MenuFlyoutItem _closePaneMenuItem; + winrt::Microsoft::Terminal::Settings::Model::IconStyle _lastIconStyle; winrt::hstring _lastIconPath{}; std::optional _runtimeTabColor{}; winrt::TerminalApp::TabHeaderControl _headerControl{}; diff --git a/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp b/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp index 4b2239a9ad7..89c34a1b733 100644 --- a/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp +++ b/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp @@ -8,6 +8,9 @@ #include #include +#include +#include + namespace winrt { namespace MUX = Microsoft::UI::Xaml; @@ -72,7 +75,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation // Return Value: // - An IconElement with its IconSource set, if possible. template - TIconSource _getColoredBitmapIcon(const winrt::hstring& path) + TIconSource _getColoredBitmapIcon(const winrt::hstring& path, bool monochrome) { // FontIcon uses glyphs in the private use area, whereas valid URIs only contain ASCII characters. // To skip throwing on Uri construction, we can quickly check if the first character is ASCII. @@ -85,7 +88,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation // Make sure to set this to false, so we keep the RGB data of the // image. Otherwise, the icon will be white for all the // non-transparent pixels in the image. - iconSource.ShowAsMonochrome(false); + iconSource.ShowAsMonochrome(monochrome); iconSource.UriSource(iconUri); return iconSource; } @@ -121,14 +124,14 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation // Return Value: // - An IconElement with its IconSource set, if possible. template - TIconSource _getIconSource(const winrt::hstring& iconPath) + TIconSource _getIconSource(const winrt::hstring& iconPath, bool monochrome) { TIconSource iconSource{ nullptr }; if (iconPath.size() != 0) { const auto expandedIconPath{ _expandIconPath(iconPath) }; - iconSource = _getColoredBitmapIcon(expandedIconPath); + iconSource = _getColoredBitmapIcon(expandedIconPath, monochrome); // If we fail to set the icon source using the "icon" as a path, // let's try it as a symbol/emoji. @@ -197,7 +200,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation const hstring& /* language */) { const auto& iconPath = winrt::unbox_value_or(value, L""); - return _getIconSource(iconPath); + return _getIconSource(iconPath, false); } // unused for one-way bindings @@ -211,12 +214,12 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation Windows::UI::Xaml::Controls::IconSource _IconSourceWUX(hstring path) { - return _getIconSource(path); + return _getIconSource(path, false); } - Microsoft::UI::Xaml::Controls::IconSource _IconSourceMUX(hstring path) + Microsoft::UI::Xaml::Controls::IconSource _IconSourceMUX(hstring path, bool monochrome) { - return _getIconSource(path); + return _getIconSource(path, monochrome); } SoftwareBitmap _convertToSoftwareBitmap(HICON hicon, @@ -329,17 +332,19 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation return bitmapSource; } - MUX::Controls::IconSource IconPathConverter::IconSourceMUX(const winrt::hstring& iconPath) + MUX::Controls::IconSource IconPathConverter::IconSourceMUX(const winrt::hstring& iconPath, + const bool monochrome) { + std::wstring_view iconPathWithoutIndex; const auto indexOpt = _getIconIndex(iconPath, iconPathWithoutIndex); if (!indexOpt.has_value()) { - return _IconSourceMUX(iconPath); + return _IconSourceMUX(iconPath, monochrome); } const auto bitmapSource = _getImageIconSourceForBinary(iconPathWithoutIndex, indexOpt.value()); - + MUX::Controls::ImageIconSource imageIconSource{}; imageIconSource.ImageSource(bitmapSource); diff --git a/src/cascadia/TerminalSettingsModel/IconPathConverter.h b/src/cascadia/TerminalSettingsModel/IconPathConverter.h index a9eee104b94..f91fdcad7bd 100644 --- a/src/cascadia/TerminalSettingsModel/IconPathConverter.h +++ b/src/cascadia/TerminalSettingsModel/IconPathConverter.h @@ -19,7 +19,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation const hstring& language); static Windows::UI::Xaml::Controls::IconElement IconWUX(const winrt::hstring& iconPath); - static Microsoft::UI::Xaml::Controls::IconSource IconSourceMUX(const winrt::hstring& iconPath); + static Microsoft::UI::Xaml::Controls::IconSource IconSourceMUX(const winrt::hstring& iconPath, const bool convertToGrayscale); }; } diff --git a/src/cascadia/TerminalSettingsModel/IconPathConverter.idl b/src/cascadia/TerminalSettingsModel/IconPathConverter.idl index bbe1e055b8c..b52367b6c34 100644 --- a/src/cascadia/TerminalSettingsModel/IconPathConverter.idl +++ b/src/cascadia/TerminalSettingsModel/IconPathConverter.idl @@ -16,7 +16,7 @@ namespace Microsoft.Terminal.Settings.Model IconPathConverter(); static Windows.UI.Xaml.Controls.IconElement IconWUX(String path); - static Microsoft.UI.Xaml.Controls.IconSource IconSourceMUX(String path); + static Microsoft.UI.Xaml.Controls.IconSource IconSourceMUX(String path, Boolean convertToGrayscale); }; } From 83bafbdf0bac51d21b6ad4d480ecdfea69c0e837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=84=A2=EF=B8=8F?= Date: Tue, 19 Sep 2023 16:19:15 +0200 Subject: [PATCH 3/4] Code formatting according to PR feedback --- src/cascadia/LocalTests_SettingsModel/ThemeTests.cpp | 2 +- src/cascadia/TerminalApp/TerminalTab.cpp | 2 +- src/cascadia/TerminalApp/TerminalTab.h | 2 +- src/cascadia/TerminalSettingsModel/IconPathConverter.cpp | 3 +-- src/cascadia/TerminalSettingsModel/MTSMSettings.h | 8 ++++---- .../TerminalSettingsSerializationHelpers.h | 5 +++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/cascadia/LocalTests_SettingsModel/ThemeTests.cpp b/src/cascadia/LocalTests_SettingsModel/ThemeTests.cpp index 3ed682ff2ce..c7bf11326af 100644 --- a/src/cascadia/LocalTests_SettingsModel/ThemeTests.cpp +++ b/src/cascadia/LocalTests_SettingsModel/ThemeTests.cpp @@ -42,7 +42,7 @@ namespace SettingsModelLocalTests TEST_METHOD(ParseNullWindowTheme); TEST_METHOD(ParseThemeWithNullThemeColor); TEST_METHOD(InvalidCurrentTheme); - + static Core::Color rgb(uint8_t r, uint8_t g, uint8_t b) noexcept { return Core::Color{ r, g, b, 255 }; diff --git a/src/cascadia/TerminalApp/TerminalTab.cpp b/src/cascadia/TerminalApp/TerminalTab.cpp index 5e8b3af680c..226efc67dfe 100644 --- a/src/cascadia/TerminalApp/TerminalTab.cpp +++ b/src/cascadia/TerminalApp/TerminalTab.cpp @@ -278,7 +278,7 @@ namespace winrt::TerminalApp::implementation // - iconPath: The new path string to use as the IconPath for our TabViewItem // Return Value: // - - void TerminalTab::UpdateIcon(const winrt::hstring iconPath, const winrt::Microsoft::Terminal::Settings::Model::IconStyle& iconStyle) + void TerminalTab::UpdateIcon(const winrt::hstring iconPath, const winrt::Microsoft::Terminal::Settings::Model::IconStyle iconStyle) { ASSERT_UI_THREAD(); diff --git a/src/cascadia/TerminalApp/TerminalTab.h b/src/cascadia/TerminalApp/TerminalTab.h index 6ea70207e8f..8ff0e6cc03f 100644 --- a/src/cascadia/TerminalApp/TerminalTab.h +++ b/src/cascadia/TerminalApp/TerminalTab.h @@ -41,7 +41,7 @@ namespace winrt::TerminalApp::implementation std::shared_ptr newPane); void ToggleSplitOrientation(); - void UpdateIcon(const winrt::hstring iconPath, const winrt::Microsoft::Terminal::Settings::Model::IconStyle& iconStyle); + void UpdateIcon(const winrt::hstring iconPath, const winrt::Microsoft::Terminal::Settings::Model::IconStyle iconStyle); void HideIcon(const bool hide); void ShowBellIndicator(const bool show); diff --git a/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp b/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp index 89c34a1b733..b038d5d38dd 100644 --- a/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp +++ b/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp @@ -335,7 +335,6 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation MUX::Controls::IconSource IconPathConverter::IconSourceMUX(const winrt::hstring& iconPath, const bool monochrome) { - std::wstring_view iconPathWithoutIndex; const auto indexOpt = _getIconIndex(iconPath, iconPathWithoutIndex); if (!indexOpt.has_value()) @@ -344,7 +343,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation } const auto bitmapSource = _getImageIconSourceForBinary(iconPathWithoutIndex, indexOpt.value()); - + MUX::Controls::ImageIconSource imageIconSource{}; imageIconSource.ImageSource(bitmapSource); diff --git a/src/cascadia/TerminalSettingsModel/MTSMSettings.h b/src/cascadia/TerminalSettingsModel/MTSMSettings.h index e5e5c87c5eb..ae676362dea 100644 --- a/src/cascadia/TerminalSettingsModel/MTSMSettings.h +++ b/src/cascadia/TerminalSettingsModel/MTSMSettings.h @@ -151,8 +151,8 @@ Author(s): X(winrt::Microsoft::Terminal::Settings::Model::ThemeColor, Background, "background", nullptr) \ X(winrt::Microsoft::Terminal::Settings::Model::ThemeColor, UnfocusedBackground, "unfocusedBackground", nullptr) -#define MTSM_THEME_TAB_SETTINGS(X) \ - X(winrt::Microsoft::Terminal::Settings::Model::ThemeColor, Background, "background", nullptr) \ - X(winrt::Microsoft::Terminal::Settings::Model::ThemeColor, UnfocusedBackground, "unfocusedBackground", nullptr) \ - X(winrt::Microsoft::Terminal::Settings::Model::IconStyle, IconStyle, "iconStyle", winrt::Microsoft::Terminal::Settings::Model::IconStyle::Default) \ +#define MTSM_THEME_TAB_SETTINGS(X) \ + X(winrt::Microsoft::Terminal::Settings::Model::ThemeColor, Background, "background", nullptr) \ + X(winrt::Microsoft::Terminal::Settings::Model::ThemeColor, UnfocusedBackground, "unfocusedBackground", nullptr) \ + X(winrt::Microsoft::Terminal::Settings::Model::IconStyle, IconStyle, "iconStyle", winrt::Microsoft::Terminal::Settings::Model::IconStyle::Default) \ X(winrt::Microsoft::Terminal::Settings::Model::TabCloseButtonVisibility, ShowCloseButton, "showCloseButton", winrt::Microsoft::Terminal::Settings::Model::TabCloseButtonVisibility::Always) diff --git a/src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h b/src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h index 293f4b4473f..f5431aabf3d 100644 --- a/src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h +++ b/src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h @@ -652,10 +652,11 @@ JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::Model::TabCloseButtonVi }; }; -JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::Model::IconStyle){ +JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::Model::IconStyle) +{ JSON_MAPPINGS(3) = { pair_type{ "default", ValueType::Default }, - pair_type{ "hidden", ValueType::Hidden }, + pair_type{ "hidden", ValueType::Hidden }, pair_type{ "monochrome", ValueType::Monochrome }, }; }; From 03efa7a8eadbbcd9d03fd332e945614564bf755f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=84=A2=EF=B8=8F?= Date: Tue, 19 Sep 2023 21:42:10 +0200 Subject: [PATCH 4/4] removed leftover headers not wanted for this pr --- src/cascadia/TerminalSettingsModel/IconPathConverter.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp b/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp index b038d5d38dd..a51ead61899 100644 --- a/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp +++ b/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp @@ -8,9 +8,6 @@ #include #include -#include -#include - namespace winrt { namespace MUX = Microsoft::UI::Xaml;