mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-11 13:36:29 -06:00
Introduce setting override tracking and update SettingContainer (#9079)
This PR adds improved override message generation for inheritance in SUI. The settings model now has an `OriginTag` to be able to denote where a `Profile` came from. This tag is used in the `SettingContainer` to generate a more specific override message. ## References #6800 - SUI Epic #8919 - SUI Inheritance PR #8804 - SUI Inheritance (old issue) ## Detailed Description of the Pull Request / Additional comments - **Terminal Settings Model** - Introduced `PROJECTED_SETTING` as a macro to more easily declare the functions for each setting - Introduced `<setting>OverrideSource` which finds the `Profile` that has \<setting\> defined - Introduced `OriginTag Profile::Origin {Custom, InBox, Generated}` to trace where a profile came from - `DefaultProfileUtils` creates profiles for profile generators. So that now sets the `Origin` tag to `Generated` - `CascadiaSettings::LoadDefaults()` tags all profiles created as `InBox`. - The view model had to ingest the API change to be able to interact with `<setting>OverrideSource` - **Override Message Generation** - The reset button now has a more specific tooltip - The reset button now only appears if base layer is being overridden - We use the settings model changes to determine the message to display for the target ## Validation Steps Performed Tested the following cases: - overrides nothing (inherited setting) - overrides value inherited from... - base layer - a profile generator - in-box profile - global settings should not have this feature
This commit is contained in:
parent
dfeb855d18
commit
eb0fb3e822
@ -50,23 +50,23 @@ namespace winrt::TerminalApp::implementation
|
||||
void ColorTable(std::array<uint32_t, 16> colors);
|
||||
std::array<uint32_t, 16> ColorTable();
|
||||
|
||||
GETSET_SETTING(uint32_t, DefaultForeground, DEFAULT_FOREGROUND_WITH_ALPHA);
|
||||
GETSET_SETTING(uint32_t, DefaultBackground, DEFAULT_BACKGROUND_WITH_ALPHA);
|
||||
GETSET_SETTING(uint32_t, SelectionBackground, DEFAULT_FOREGROUND);
|
||||
GETSET_SETTING(int32_t, HistorySize, DEFAULT_HISTORY_SIZE);
|
||||
GETSET_SETTING(int32_t, InitialRows, 30);
|
||||
GETSET_SETTING(int32_t, InitialCols, 80);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, uint32_t, DefaultForeground, DEFAULT_FOREGROUND_WITH_ALPHA);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, uint32_t, DefaultBackground, DEFAULT_BACKGROUND_WITH_ALPHA);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, uint32_t, SelectionBackground, DEFAULT_FOREGROUND);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, int32_t, HistorySize, DEFAULT_HISTORY_SIZE);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, int32_t, InitialRows, 30);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, int32_t, InitialCols, 80);
|
||||
|
||||
GETSET_SETTING(bool, SnapOnInput, true);
|
||||
GETSET_SETTING(bool, AltGrAliasing, true);
|
||||
GETSET_SETTING(uint32_t, CursorColor, DEFAULT_CURSOR_COLOR);
|
||||
GETSET_SETTING(Microsoft::Terminal::TerminalControl::CursorStyle, CursorShape, Microsoft::Terminal::TerminalControl::CursorStyle::Vintage);
|
||||
GETSET_SETTING(uint32_t, CursorHeight, DEFAULT_CURSOR_HEIGHT);
|
||||
GETSET_SETTING(hstring, WordDelimiters, DEFAULT_WORD_DELIMITERS);
|
||||
GETSET_SETTING(bool, CopyOnSelect, false);
|
||||
GETSET_SETTING(bool, FocusFollowMouse, false);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, bool, SnapOnInput, true);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, bool, AltGrAliasing, true);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, uint32_t, CursorColor, DEFAULT_CURSOR_COLOR);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, Microsoft::Terminal::TerminalControl::CursorStyle, CursorShape, Microsoft::Terminal::TerminalControl::CursorStyle::Vintage);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, uint32_t, CursorHeight, DEFAULT_CURSOR_HEIGHT);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, hstring, WordDelimiters, DEFAULT_WORD_DELIMITERS);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, bool, CopyOnSelect, false);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, bool, FocusFollowMouse, false);
|
||||
|
||||
GETSET_SETTING(Windows::Foundation::IReference<uint32_t>, TabColor, nullptr);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, Windows::Foundation::IReference<uint32_t>, TabColor, nullptr);
|
||||
|
||||
// When set, StartingTabColor allows to create a terminal with a "sticky" tab color.
|
||||
// This color is prioritized above the TabColor (that is usually initialized based on profile settings).
|
||||
@ -76,48 +76,42 @@ namespace winrt::TerminalApp::implementation
|
||||
// TODO: to ensure that this property is not populated during settings reload,
|
||||
// we should consider moving this property to a separate interface,
|
||||
// passed to the terminal only upon creation.
|
||||
GETSET_SETTING(Windows::Foundation::IReference<uint32_t>, StartingTabColor, nullptr);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, Windows::Foundation::IReference<uint32_t>, StartingTabColor, nullptr);
|
||||
|
||||
// ------------------------ End of Core Settings -----------------------
|
||||
|
||||
GETSET_SETTING(hstring, ProfileName);
|
||||
GETSET_SETTING(bool, UseAcrylic, false);
|
||||
GETSET_SETTING(double, TintOpacity, 0.5);
|
||||
GETSET_SETTING(hstring, Padding, DEFAULT_PADDING);
|
||||
GETSET_SETTING(hstring, FontFace, DEFAULT_FONT_FACE);
|
||||
GETSET_SETTING(int32_t, FontSize, DEFAULT_FONT_SIZE);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, hstring, ProfileName);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, bool, UseAcrylic, false);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, double, TintOpacity, 0.5);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, hstring, Padding, DEFAULT_PADDING);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, hstring, FontFace, DEFAULT_FONT_FACE);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, int32_t, FontSize, DEFAULT_FONT_SIZE);
|
||||
|
||||
GETSET_SETTING(winrt::Windows::UI::Text::FontWeight, FontWeight);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, winrt::Windows::UI::Text::FontWeight, FontWeight);
|
||||
|
||||
GETSET_SETTING(hstring, BackgroundImage);
|
||||
GETSET_SETTING(double, BackgroundImageOpacity, 1.0);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, hstring, BackgroundImage);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, double, BackgroundImageOpacity, 1.0);
|
||||
|
||||
GETSET_SETTING(winrt::Windows::UI::Xaml::Media::Stretch,
|
||||
BackgroundImageStretchMode,
|
||||
winrt::Windows::UI::Xaml::Media::Stretch::UniformToFill);
|
||||
GETSET_SETTING(winrt::Windows::UI::Xaml::HorizontalAlignment,
|
||||
BackgroundImageHorizontalAlignment,
|
||||
winrt::Windows::UI::Xaml::HorizontalAlignment::Center);
|
||||
GETSET_SETTING(winrt::Windows::UI::Xaml::VerticalAlignment,
|
||||
BackgroundImageVerticalAlignment,
|
||||
winrt::Windows::UI::Xaml::VerticalAlignment::Center);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, winrt::Windows::UI::Xaml::Media::Stretch, BackgroundImageStretchMode, winrt::Windows::UI::Xaml::Media::Stretch::UniformToFill);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, winrt::Windows::UI::Xaml::HorizontalAlignment, BackgroundImageHorizontalAlignment, winrt::Windows::UI::Xaml::HorizontalAlignment::Center);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, winrt::Windows::UI::Xaml::VerticalAlignment, BackgroundImageVerticalAlignment, winrt::Windows::UI::Xaml::VerticalAlignment::Center);
|
||||
|
||||
GETSET_SETTING(Microsoft::Terminal::TerminalControl::IKeyBindings, KeyBindings, nullptr);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, Microsoft::Terminal::TerminalControl::IKeyBindings, KeyBindings, nullptr);
|
||||
|
||||
GETSET_SETTING(hstring, Commandline);
|
||||
GETSET_SETTING(hstring, StartingDirectory);
|
||||
GETSET_SETTING(hstring, StartingTitle);
|
||||
GETSET_SETTING(bool, SuppressApplicationTitle);
|
||||
GETSET_SETTING(hstring, EnvironmentVariables);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, hstring, Commandline);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, hstring, StartingDirectory);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, hstring, StartingTitle);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, bool, SuppressApplicationTitle);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, hstring, EnvironmentVariables);
|
||||
|
||||
GETSET_SETTING(Microsoft::Terminal::TerminalControl::ScrollbarState, ScrollState, Microsoft::Terminal::TerminalControl::ScrollbarState::Visible);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, Microsoft::Terminal::TerminalControl::ScrollbarState, ScrollState, Microsoft::Terminal::TerminalControl::ScrollbarState::Visible);
|
||||
|
||||
GETSET_SETTING(Microsoft::Terminal::TerminalControl::TextAntialiasingMode, AntialiasingMode, Microsoft::Terminal::TerminalControl::TextAntialiasingMode::Grayscale);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, Microsoft::Terminal::TerminalControl::TextAntialiasingMode, AntialiasingMode, Microsoft::Terminal::TerminalControl::TextAntialiasingMode::Grayscale);
|
||||
|
||||
GETSET_SETTING(bool, RetroTerminalEffect, false);
|
||||
GETSET_SETTING(bool, ForceFullRepaintRendering, false);
|
||||
GETSET_SETTING(bool, SoftwareRendering, false);
|
||||
GETSET_SETTING(bool, ForceVTInput, false);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, bool, RetroTerminalEffect, false);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, bool, ForceFullRepaintRendering, false);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, bool, SoftwareRendering, false);
|
||||
GETSET_SETTING(TerminalApp::TerminalSettings, bool, ForceVTInput, false);
|
||||
|
||||
GETSET_PROPERTY(hstring, PixelShaderPath);
|
||||
|
||||
|
||||
@ -277,6 +277,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - updates the content frame to present a view of the profile page
|
||||
// - NOTE: this does not update the selected item.
|
||||
// Arguments:
|
||||
// - profile - the profile object we are getting a view of
|
||||
void MainPage::_Navigate(const Editor::ProfileViewModel& profile)
|
||||
{
|
||||
_lastProfilesNavState = winrt::make<ProfilePageNavigationState>(profile,
|
||||
|
||||
@ -78,6 +78,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<muxc:NavigationViewItemHeader x:Uid="Nav_Profiles"/>
|
||||
|
||||
<muxc:NavigationViewItem x:Uid="Nav_ProfileDefaults"
|
||||
x:Name="BaseLayerMenuItem"
|
||||
Tag="GlobalProfile_Nav">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph=""/>
|
||||
|
||||
@ -6,6 +6,10 @@ import "MainPage.idl";
|
||||
|
||||
#include "ViewModelHelpers.idl.h"
|
||||
|
||||
#define OBSERVABLE_PROJECTED_PROFILE_SETTING(Type, Name) \
|
||||
OBSERVABLE_PROJECTED_SETTING(Type, Name); \
|
||||
Microsoft.Terminal.Settings.Model.Profile Name##OverrideSource { get; }
|
||||
|
||||
namespace Microsoft.Terminal.Settings.Editor
|
||||
{
|
||||
runtimeclass ProfileViewModel : Windows.UI.Xaml.Data.INotifyPropertyChanged
|
||||
@ -17,44 +21,44 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
Boolean UseCustomStartingDirectory { get; };
|
||||
Boolean BackgroundImageSettingsVisible { get; };
|
||||
|
||||
OBSERVABLE_PROJECTED_SETTING(String, Name);
|
||||
OBSERVABLE_PROJECTED_SETTING(Guid, Guid);
|
||||
OBSERVABLE_PROJECTED_SETTING(String, Source);
|
||||
OBSERVABLE_PROJECTED_SETTING(Guid, ConnectionType);
|
||||
OBSERVABLE_PROJECTED_SETTING(Boolean, Hidden);
|
||||
OBSERVABLE_PROJECTED_SETTING(String, Icon);
|
||||
OBSERVABLE_PROJECTED_SETTING(Microsoft.Terminal.Settings.Model.CloseOnExitMode, CloseOnExit);
|
||||
OBSERVABLE_PROJECTED_SETTING(String, TabTitle);
|
||||
OBSERVABLE_PROJECTED_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, TabColor);
|
||||
OBSERVABLE_PROJECTED_SETTING(Boolean, SuppressApplicationTitle);
|
||||
OBSERVABLE_PROJECTED_SETTING(Boolean, UseAcrylic);
|
||||
OBSERVABLE_PROJECTED_SETTING(Double, AcrylicOpacity);
|
||||
OBSERVABLE_PROJECTED_SETTING(Microsoft.Terminal.TerminalControl.ScrollbarState, ScrollState);
|
||||
OBSERVABLE_PROJECTED_SETTING(String, FontFace);
|
||||
OBSERVABLE_PROJECTED_SETTING(Int32, FontSize);
|
||||
OBSERVABLE_PROJECTED_SETTING(Windows.UI.Text.FontWeight, FontWeight);
|
||||
OBSERVABLE_PROJECTED_SETTING(String, Padding);
|
||||
OBSERVABLE_PROJECTED_SETTING(String, Commandline);
|
||||
OBSERVABLE_PROJECTED_SETTING(String, StartingDirectory);
|
||||
OBSERVABLE_PROJECTED_SETTING(String, BackgroundImagePath);
|
||||
OBSERVABLE_PROJECTED_SETTING(Double, BackgroundImageOpacity);
|
||||
OBSERVABLE_PROJECTED_SETTING(Windows.UI.Xaml.Media.Stretch, BackgroundImageStretchMode);
|
||||
OBSERVABLE_PROJECTED_SETTING(Microsoft.Terminal.Settings.Model.ConvergedAlignment, BackgroundImageAlignment);
|
||||
OBSERVABLE_PROJECTED_SETTING(Microsoft.Terminal.TerminalControl.TextAntialiasingMode, AntialiasingMode);
|
||||
OBSERVABLE_PROJECTED_SETTING(Boolean, RetroTerminalEffect);
|
||||
OBSERVABLE_PROJECTED_SETTING(Boolean, ForceFullRepaintRendering);
|
||||
OBSERVABLE_PROJECTED_SETTING(Boolean, SoftwareRendering);
|
||||
OBSERVABLE_PROJECTED_SETTING(String, ColorSchemeName);
|
||||
OBSERVABLE_PROJECTED_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, Foreground);
|
||||
OBSERVABLE_PROJECTED_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, Background);
|
||||
OBSERVABLE_PROJECTED_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, SelectionBackground);
|
||||
OBSERVABLE_PROJECTED_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, CursorColor);
|
||||
OBSERVABLE_PROJECTED_SETTING(Int32, HistorySize);
|
||||
OBSERVABLE_PROJECTED_SETTING(Boolean, SnapOnInput);
|
||||
OBSERVABLE_PROJECTED_SETTING(Boolean, AltGrAliasing);
|
||||
OBSERVABLE_PROJECTED_SETTING(Microsoft.Terminal.TerminalControl.CursorStyle, CursorShape);
|
||||
OBSERVABLE_PROJECTED_SETTING(UInt32, CursorHeight);
|
||||
OBSERVABLE_PROJECTED_SETTING(Microsoft.Terminal.Settings.Model.BellStyle, BellStyle);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, Name);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Guid, Guid);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, Source);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Guid, ConnectionType);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, Hidden);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, Icon);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.Settings.Model.CloseOnExitMode, CloseOnExit);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, TabTitle);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, TabColor);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, SuppressApplicationTitle);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, UseAcrylic);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Double, AcrylicOpacity);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.TerminalControl.ScrollbarState, ScrollState);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, FontFace);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Int32, FontSize);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Windows.UI.Text.FontWeight, FontWeight);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, Padding);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, Commandline);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, StartingDirectory);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, BackgroundImagePath);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Double, BackgroundImageOpacity);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Windows.UI.Xaml.Media.Stretch, BackgroundImageStretchMode);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.Settings.Model.ConvergedAlignment, BackgroundImageAlignment);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.TerminalControl.TextAntialiasingMode, AntialiasingMode);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, RetroTerminalEffect);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, ForceFullRepaintRendering);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, SoftwareRendering);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, ColorSchemeName);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, Foreground);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, Background);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, SelectionBackground);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, CursorColor);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Int32, HistorySize);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, SnapOnInput);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, AltGrAliasing);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.TerminalControl.CursorStyle, CursorShape);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(UInt32, CursorHeight);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.Settings.Model.BellStyle, BellStyle);
|
||||
}
|
||||
|
||||
runtimeclass DeleteProfileEventArgs
|
||||
|
||||
@ -76,6 +76,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
x:Name="CommandlineContainer"
|
||||
HasSettingValue="{x:Bind State.Profile.HasCommandline, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearCommandline}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.CommandlineOverrideSource, Mode=OneWay}"
|
||||
Visibility="{x:Bind State.Profile.IsBaseLayer, Mode=OneWay, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
|
||||
Margin="0,0,0,24">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@ -92,6 +93,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
x:Name="StartingDirectoryContainer"
|
||||
HasSettingValue="{x:Bind State.Profile.HasStartingDirectory, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearStartingDirectory}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.StartingDirectoryOverrideSource, Mode=OneWay}"
|
||||
Margin="0">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@ -113,7 +115,8 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<!--Icon-->
|
||||
<local:SettingContainer x:Uid="Profile_Icon"
|
||||
HasSettingValue="{x:Bind State.Profile.HasIcon, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearIcon}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearIcon}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.IconOverrideSource, Mode=OneWay}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{x:Bind State.Profile.Icon, Mode=TwoWay}"
|
||||
FontFamily="Segoe UI, Segoe MDL2 Assets"
|
||||
@ -127,7 +130,8 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<!--Tab Title-->
|
||||
<local:SettingContainer x:Uid="Profile_TabTitle"
|
||||
HasSettingValue="{x:Bind State.Profile.HasTabTitle, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearTabTitle}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearTabTitle}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.TabTitleOverrideSource, Mode=OneWay}">
|
||||
<TextBox Text="{x:Bind State.Profile.TabTitle, Mode=TwoWay}"
|
||||
Style="{StaticResource TextBoxSettingStyle}"/>
|
||||
</local:SettingContainer>
|
||||
@ -212,6 +216,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<local:SettingContainer x:Uid="Profile_ColorScheme"
|
||||
HasSettingValue="{x:Bind State.Profile.HasColorSchemeName, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearColorSchemeName}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.ColorSchemeNameOverrideSource, Mode=OneWay}"
|
||||
Margin="0">
|
||||
<ComboBox ItemsSource="{x:Bind ColorSchemeList, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind CurrentColorScheme, Mode=TwoWay}"
|
||||
@ -227,7 +232,8 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<!--Font Face-->
|
||||
<local:SettingContainer x:Uid="Profile_FontFace"
|
||||
HasSettingValue="{x:Bind State.Profile.HasFontFace, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearFontFace}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearFontFace}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.FontFaceOverrideSource, Mode=OneWay}">
|
||||
<TextBox Text="{x:Bind State.Profile.FontFace, Mode=TwoWay}"
|
||||
Style="{StaticResource TextBoxSettingStyle}"/>
|
||||
</local:SettingContainer>
|
||||
@ -235,7 +241,8 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<!--Font Size-->
|
||||
<local:SettingContainer x:Uid="Profile_FontSize"
|
||||
HasSettingValue="{x:Bind State.Profile.HasFontSize, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearFontSize}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearFontSize}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.FontSizeOverrideSource, Mode=OneWay}">
|
||||
<muxc:NumberBox Value="{x:Bind State.Profile.FontSize, Mode=TwoWay}"
|
||||
Style="{StaticResource NumberBoxSettingStyle}"
|
||||
AcceptsExpression="False"
|
||||
@ -249,7 +256,8 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<local:SettingContainer x:Uid="Profile_FontWeight"
|
||||
x:Name="FontWeightContainer"
|
||||
HasSettingValue="{x:Bind State.Profile.HasFontWeight, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearFontWeight}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearFontWeight}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.FontWeightOverrideSource, Mode=OneWay}">
|
||||
<StackPanel>
|
||||
<ComboBox x:Name="FontWeightComboBox"
|
||||
ItemsSource="{x:Bind FontWeightList, Mode=OneWay}"
|
||||
@ -283,7 +291,8 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<!--Retro Terminal Effect-->
|
||||
<local:SettingContainer x:Uid="Profile_RetroTerminalEffect"
|
||||
HasSettingValue="{x:Bind State.Profile.HasRetroTerminalEffect, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearRetroTerminalEffect}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearRetroTerminalEffect}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.RetroTerminalEffectOverrideSource, Mode=OneWay}">
|
||||
<ToggleSwitch IsOn="{x:Bind State.Profile.RetroTerminalEffect, Mode=TwoWay}"/>
|
||||
</local:SettingContainer>
|
||||
</StackPanel>
|
||||
@ -296,6 +305,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<local:SettingContainer x:Uid="Profile_CursorShape"
|
||||
HasSettingValue="{x:Bind State.Profile.HasCursorShape, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearCursorShape}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.CursorShapeOverrideSource, Mode=OneWay}"
|
||||
Margin="0">
|
||||
<muxc:RadioButtons ItemsSource="{x:Bind CursorShapeList, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind CurrentCursorShape, Mode=TwoWay}"
|
||||
@ -306,6 +316,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<local:SettingContainer x:Uid="Profile_CursorHeight"
|
||||
HasSettingValue="{x:Bind State.Profile.HasCursorHeight, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearCursorHeight}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.CursorHeightOverrideSource, Mode=OneWay}"
|
||||
Visibility="{x:Bind IsVintageCursor, Mode=OneWay}">
|
||||
<muxc:NumberBox Value="{x:Bind State.Profile.CursorHeight, Mode=TwoWay}"
|
||||
Style="{StaticResource NumberBoxSettingStyle}"
|
||||
@ -323,6 +334,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
x:Name="BackgroundImageContainer"
|
||||
HasSettingValue="{x:Bind State.Profile.HasBackgroundImagePath, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearBackgroundImagePath}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.BackgroundImagePathOverrideSource, Mode=OneWay}"
|
||||
Margin="0">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@ -344,6 +356,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<local:SettingContainer x:Uid="Profile_BackgroundImageStretchMode"
|
||||
HasSettingValue="{x:Bind State.Profile.HasBackgroundImageStretchMode, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearBackgroundImageStretchMode}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.BackgroundImageStretchModeOverrideSource, Mode=OneWay}"
|
||||
Visibility="{x:Bind State.Profile.BackgroundImageSettingsVisible, Mode=OneWay}">
|
||||
<muxc:RadioButtons ItemsSource="{x:Bind BackgroundImageStretchModeList, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind CurrentBackgroundImageStretchMode, Mode=TwoWay}"
|
||||
@ -354,6 +367,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<local:SettingContainer x:Uid="Profile_BackgroundImageAlignment"
|
||||
HasSettingValue="{x:Bind State.Profile.HasBackgroundImageAlignment, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearBackgroundImageAlignment}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.BackgroundImageAlignmentOverrideSource, Mode=OneWay}"
|
||||
Visibility="{x:Bind State.Profile.BackgroundImageSettingsVisible, Mode=OneWay}">
|
||||
<Grid HorizontalAlignment="Left">
|
||||
<Grid.RowDefinitions>
|
||||
@ -509,6 +523,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
x:Name="BackgroundImageOpacityContainer"
|
||||
HasSettingValue="{x:Bind State.Profile.HasBackgroundImageOpacity, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearBackgroundImageOpacity}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.BackgroundImageOpacityOverrideSource, Mode=OneWay}"
|
||||
Visibility="{x:Bind State.Profile.BackgroundImageSettingsVisible, Mode=OneWay}">
|
||||
<Grid Style="{StaticResource CustomSliderControlGridStyle}">
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -533,6 +548,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<local:SettingContainer x:Uid="Profile_UseAcrylic"
|
||||
HasSettingValue="{x:Bind State.Profile.HasUseAcrylic, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearUseAcrylic}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.UseAcrylicOverrideSource, Mode=OneWay}"
|
||||
Margin="0">
|
||||
<ToggleSwitch x:Name="UseAcrylicToggleSwitch"
|
||||
IsOn="{x:Bind State.Profile.UseAcrylic, Mode=TwoWay}"/>
|
||||
@ -543,6 +559,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
x:Name="AcrylicOpacityContainer"
|
||||
HasSettingValue="{x:Bind State.Profile.HasAcrylicOpacity, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearAcrylicOpacity}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.AcrylicOpacityOverrideSource, Mode=OneWay}"
|
||||
Visibility="{Binding ElementName=UseAcrylicToggleSwitch, Path=IsOn, Mode=OneWay}">
|
||||
<StackPanel x:Name="AcrylicOpacityControl">
|
||||
<Grid Style="{StaticResource CustomSliderControlGridStyle}">
|
||||
@ -569,6 +586,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<local:SettingContainer x:Uid="Profile_Padding"
|
||||
HasSettingValue="{x:Bind State.Profile.HasPadding, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearPadding}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.PaddingOverrideSource, Mode=OneWay}"
|
||||
Margin="0">
|
||||
<Grid Style="{StaticResource CustomSliderControlGridStyle}">
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -587,7 +605,8 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<!--Scrollbar Visibility-->
|
||||
<local:SettingContainer x:Uid="Profile_ScrollbarVisibility"
|
||||
HasSettingValue="{x:Bind State.Profile.HasScrollState, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearScrollState}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearScrollState}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.ScrollStateOverrideSource, Mode=OneWay}">
|
||||
<muxc:RadioButtons ItemsSource="{x:Bind ScrollStateList, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind CurrentScrollState, Mode=TwoWay}"
|
||||
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"/>
|
||||
@ -605,6 +624,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<local:SettingContainer x:Uid="Profile_SuppressApplicationTitle"
|
||||
HasSettingValue="{x:Bind State.Profile.HasSuppressApplicationTitle, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearSuppressApplicationTitle}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.SuppressApplicationTitleOverrideSource, Mode=OneWay}"
|
||||
Margin="0">
|
||||
<ToggleSwitch IsOn="{x:Bind State.Profile.SuppressApplicationTitle, Mode=TwoWay}"/>
|
||||
</local:SettingContainer>
|
||||
@ -612,7 +632,8 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<!--Antialiasing Mode-->
|
||||
<local:SettingContainer x:Uid="Profile_AntialiasingMode"
|
||||
HasSettingValue="{x:Bind State.Profile.HasAntialiasingMode, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearAntialiasingMode}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearAntialiasingMode}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.AntialiasingModeOverrideSource, Mode=OneWay}">
|
||||
<muxc:RadioButtons ItemsSource="{x:Bind AntiAliasingModeList, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind CurrentAntiAliasingMode, Mode=TwoWay}"
|
||||
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"/>
|
||||
@ -621,21 +642,24 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<!--AltGr Aliasing-->
|
||||
<local:SettingContainer x:Uid="Profile_AltGrAliasing"
|
||||
HasSettingValue="{x:Bind State.Profile.HasAltGrAliasing, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearAltGrAliasing}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearAltGrAliasing}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.AltGrAliasingOverrideSource, Mode=OneWay}">
|
||||
<ToggleSwitch IsOn="{x:Bind State.Profile.AltGrAliasing, Mode=TwoWay}"/>
|
||||
</local:SettingContainer>
|
||||
|
||||
<!--Snap On Input-->
|
||||
<local:SettingContainer x:Uid="Profile_SnapOnInput"
|
||||
HasSettingValue="{x:Bind State.Profile.HasSnapOnInput, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearSnapOnInput}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearSnapOnInput}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.SnapOnInputOverrideSource, Mode=OneWay}">
|
||||
<ToggleSwitch IsOn="{x:Bind State.Profile.SnapOnInput, Mode=TwoWay}"/>
|
||||
</local:SettingContainer>
|
||||
|
||||
<!--History Size-->
|
||||
<local:SettingContainer x:Uid="Profile_HistorySize"
|
||||
HasSettingValue="{x:Bind State.Profile.HasHistorySize, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearHistorySize}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearHistorySize}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.HistorySizeOverrideSource, Mode=OneWay}">
|
||||
<muxc:NumberBox Value="{x:Bind State.Profile.HistorySize, Mode=TwoWay}"
|
||||
Style="{StaticResource NumberBoxSettingStyle}"
|
||||
SmallChange="10"
|
||||
@ -645,7 +669,8 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<!--Close On Exit-->
|
||||
<local:SettingContainer x:Uid="Profile_CloseOnExit"
|
||||
HasSettingValue="{x:Bind State.Profile.HasCloseOnExit, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearCloseOnExit}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearCloseOnExit}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.CloseOnExitOverrideSource, Mode=OneWay}">
|
||||
<muxc:RadioButtons ItemsSource="{x:Bind CloseOnExitModeList, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind CurrentCloseOnExitMode, Mode=TwoWay}"
|
||||
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"/>
|
||||
@ -654,7 +679,8 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<!--Bell Style-->
|
||||
<local:SettingContainer x:Uid="Profile_BellStyle"
|
||||
HasSettingValue="{x:Bind State.Profile.HasBellStyle, Mode=OneWay}"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearBellStyle}">
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearBellStyle}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.BellStyleOverrideSource, Mode=OneWay}">
|
||||
<muxc:RadioButtons ItemsSource="{x:Bind BellStyleList, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind CurrentBellStyle, Mode=TwoWay}"
|
||||
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"/>
|
||||
|
||||
@ -829,27 +829,24 @@
|
||||
<data name="ColorScheme_RenameErrorTip.Title" xml:space="preserve">
|
||||
<value>This color scheme name is already in use.</value>
|
||||
</data>
|
||||
<data name="SettingContainer_OverrideIntro" xml:space="preserve">
|
||||
<value>This overrides the value in {}.</value>
|
||||
<comment>"{}" is the object being overridden. Generally, it will be the name of another profile.</comment>
|
||||
</data>
|
||||
<data name="SettingContainer_ResetButtonHelpText" xml:space="preserve">
|
||||
<value>Reset</value>
|
||||
</data>
|
||||
<data name="SettingContainer_OverrideTarget" xml:space="preserve">
|
||||
<value>a lower layer</value>
|
||||
<comment>This is the object of "SettingContainer_OverrideIntro".</comment>
|
||||
</data>
|
||||
<data name="Globals_FocusFollowMouse.Header" xml:space="preserve">
|
||||
<value>Automatically focus pane on mouse hover</value>
|
||||
</data>
|
||||
<data name="Globals_DisableAnimationsReversed.Header" xml:space="preserve">
|
||||
<value>Pane animations</value>
|
||||
</data>
|
||||
<data name="SettingContainer_OverrideMessageBaseLayer" xml:space="preserve">
|
||||
<value>Reset to base layer value.</value>
|
||||
<comment>"base layer" should match Nav_ProfileDefaults.Content's text</comment>
|
||||
</data>
|
||||
<data name="ColorScheme_TerminalColorsHeader.Text" xml:space="preserve">
|
||||
<value>Terminal colors</value>
|
||||
</data>
|
||||
<data name="ColorScheme_SystemColorsHeader.Text" xml:space="preserve">
|
||||
<value>System colors</value>
|
||||
</data>
|
||||
<data name="SettingContainer_OverrideMessageFragmentExtension" xml:space="preserve">
|
||||
<value>Reset to value from: {}</value>
|
||||
<comment>{} is replaced by the name of another profile or generator.</comment>
|
||||
</data>
|
||||
</root>
|
||||
@ -13,6 +13,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
DependencyProperty SettingContainer::_HeaderProperty{ nullptr };
|
||||
DependencyProperty SettingContainer::_HelpTextProperty{ nullptr };
|
||||
DependencyProperty SettingContainer::_HasSettingValueProperty{ nullptr };
|
||||
DependencyProperty SettingContainer::_SettingOverrideSourceProperty{ nullptr };
|
||||
|
||||
SettingContainer::SettingContainer()
|
||||
{
|
||||
@ -51,37 +52,26 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
xaml_typename<Editor::SettingContainer>(),
|
||||
PropertyMetadata{ box_value(false), PropertyChangedCallback{ &SettingContainer::_OnHasSettingValueChanged } });
|
||||
}
|
||||
if (!_SettingOverrideSourceProperty)
|
||||
{
|
||||
_SettingOverrideSourceProperty =
|
||||
DependencyProperty::Register(
|
||||
L"SettingOverrideSource",
|
||||
xaml_typename<bool>(),
|
||||
xaml_typename<Editor::SettingContainer>(),
|
||||
PropertyMetadata{ nullptr });
|
||||
}
|
||||
}
|
||||
|
||||
void SettingContainer::_OnHasSettingValueChanged(DependencyObject const& d, DependencyPropertyChangedEventArgs const& args)
|
||||
void SettingContainer::_OnHasSettingValueChanged(DependencyObject const& d, DependencyPropertyChangedEventArgs const& /*args*/)
|
||||
{
|
||||
// update visibility for override message and reset button
|
||||
const auto& obj{ d.try_as<Editor::SettingContainer>() };
|
||||
const auto& newVal{ unbox_value<bool>(args.NewValue()) };
|
||||
|
||||
// update visibility for reset button
|
||||
if (const auto& resetButton{ obj.GetTemplateChild(L"ResetButton") })
|
||||
{
|
||||
if (const auto& elem{ resetButton.try_as<UIElement>() })
|
||||
{
|
||||
elem.Visibility(newVal ? Visibility::Visible : Visibility::Collapsed);
|
||||
}
|
||||
}
|
||||
|
||||
// update visibility for override message
|
||||
if (const auto& overrideMsg{ obj.GetTemplateChild(L"OverrideMessage") })
|
||||
{
|
||||
if (const auto& elem{ overrideMsg.try_as<UIElement>() })
|
||||
{
|
||||
elem.Visibility(newVal ? Visibility::Visible : Visibility::Collapsed);
|
||||
}
|
||||
}
|
||||
get_self<SettingContainer>(obj)->_UpdateOverrideSystem();
|
||||
}
|
||||
|
||||
void SettingContainer::OnApplyTemplate()
|
||||
{
|
||||
// This message is only populated if `HasSettingValue` is true.
|
||||
const auto& overrideMsg{ _GenerateOverrideMessageText() };
|
||||
|
||||
if (const auto& child{ GetTemplateChild(L"ResetButton") })
|
||||
{
|
||||
if (const auto& button{ child.try_as<Controls::Button>() })
|
||||
@ -115,37 +105,12 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
}
|
||||
});
|
||||
|
||||
// apply tooltip and name (automation property)
|
||||
const auto& name{ RS_(L"SettingContainer_ResetButtonHelpText") };
|
||||
Controls::ToolTipService::SetToolTip(child, box_value(name));
|
||||
Automation::AutomationProperties::SetName(child, name);
|
||||
Automation::AutomationProperties::SetHelpText(child, overrideMsg);
|
||||
|
||||
// initialize visibility for reset button
|
||||
button.Visibility(HasSettingValue() ? Visibility::Visible : Visibility::Collapsed);
|
||||
// apply name (automation property)
|
||||
Automation::AutomationProperties::SetName(child, RS_(L"SettingContainer_OverrideMessageBaseLayer"));
|
||||
}
|
||||
}
|
||||
|
||||
if (const auto& child{ GetTemplateChild(L"OverrideMessage") })
|
||||
{
|
||||
if (const auto& tb{ child.try_as<Controls::TextBlock>() })
|
||||
{
|
||||
if (!overrideMsg.empty())
|
||||
{
|
||||
// Create the override message
|
||||
// TODO GH#6800: the override target will be replaced with hyperlink/text directing the user to another profile.
|
||||
tb.Text(overrideMsg);
|
||||
|
||||
// initialize visibility for reset button
|
||||
tb.Visibility(Visibility::Visible);
|
||||
}
|
||||
else
|
||||
{
|
||||
// we have no message to render
|
||||
tb.Visibility(Visibility::Collapsed);
|
||||
}
|
||||
}
|
||||
}
|
||||
_UpdateOverrideSystem();
|
||||
|
||||
if (const auto& content{ Content() })
|
||||
{
|
||||
@ -172,12 +137,72 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
}
|
||||
}
|
||||
|
||||
hstring SettingContainer::_GenerateOverrideMessageText()
|
||||
// Method Description:
|
||||
// - Updates the override system visibility and text
|
||||
// Arguments:
|
||||
// - <none>
|
||||
void SettingContainer::_UpdateOverrideSystem()
|
||||
{
|
||||
if (const auto& child{ GetTemplateChild(L"ResetButton") })
|
||||
{
|
||||
if (const auto& button{ child.try_as<Controls::Button>() })
|
||||
{
|
||||
if (HasSettingValue())
|
||||
{
|
||||
return hstring{ fmt::format(std::wstring_view{ RS_(L"SettingContainer_OverrideIntro") }, RS_(L"SettingContainer_OverrideTarget")) };
|
||||
// We want to be smart about showing the override system.
|
||||
// Don't just show it if the user explicitly set the setting.
|
||||
// If the tooltip is empty, we'll hide the entire override system.
|
||||
hstring tooltip{};
|
||||
|
||||
const auto& settingSrc{ SettingOverrideSource() };
|
||||
if (const auto& profile{ settingSrc.try_as<Model::Profile>() })
|
||||
{
|
||||
tooltip = _GenerateOverrideMessage(profile);
|
||||
}
|
||||
|
||||
Controls::ToolTipService::SetToolTip(button, box_value(tooltip));
|
||||
button.Visibility(tooltip.empty() ? Visibility::Collapsed : Visibility::Visible);
|
||||
}
|
||||
else
|
||||
{
|
||||
// a value is not being overridden; hide the override system
|
||||
button.Visibility(Visibility::Collapsed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Helper function for generating the override message
|
||||
// Arguments:
|
||||
// - profile: the profile that defines the setting (aka SettingOverrideSource)
|
||||
// Return Value:
|
||||
// - text specifying where the setting was defined. If empty, we don't want to show the system.
|
||||
hstring SettingContainer::_GenerateOverrideMessage(const Model::Profile& profile)
|
||||
{
|
||||
const auto originTag{ profile.Origin() };
|
||||
if (originTag == Model::OriginTag::InBox)
|
||||
{
|
||||
// in-box profile
|
||||
return {};
|
||||
}
|
||||
else if (originTag == Model::OriginTag::Generated)
|
||||
{
|
||||
// from a dynamic profile generator
|
||||
return {};
|
||||
}
|
||||
else if (originTag == Model::OriginTag::Fragment)
|
||||
{
|
||||
// from a fragment extension
|
||||
return hstring{ fmt::format(std::wstring_view{ RS_(L"SettingContainer_OverrideMessageFragmentExtension") }, profile.Source()) };
|
||||
}
|
||||
else
|
||||
{
|
||||
// base layer
|
||||
// TODO GH#3818: When we add profile inheritance as a setting,
|
||||
// we'll need an extra conditional check to see if this
|
||||
// is the base layer or some other profile
|
||||
return RS_(L"SettingContainer_OverrideMessageBaseLayer");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,12 +53,14 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
DEPENDENCY_PROPERTY(Windows::Foundation::IInspectable, Header);
|
||||
DEPENDENCY_PROPERTY(hstring, HelpText);
|
||||
DEPENDENCY_PROPERTY(bool, HasSettingValue);
|
||||
DEPENDENCY_PROPERTY(IInspectable, SettingOverrideSource);
|
||||
TYPED_EVENT(ClearSettingValue, Editor::SettingContainer, Windows::Foundation::IInspectable);
|
||||
|
||||
private:
|
||||
static void _InitializeProperties();
|
||||
static void _OnHasSettingValueChanged(Windows::UI::Xaml::DependencyObject const& d, Windows::UI::Xaml::DependencyPropertyChangedEventArgs const& e);
|
||||
hstring _GenerateOverrideMessageText();
|
||||
static hstring _GenerateOverrideMessage(const Model::Profile& profile);
|
||||
void _UpdateOverrideSystem();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,9 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
Boolean HasSettingValue;
|
||||
static Windows.UI.Xaml.DependencyProperty HasSettingValueProperty { get; };
|
||||
|
||||
IInspectable SettingOverrideSource;
|
||||
static Windows.UI.Xaml.DependencyProperty SettingOverrideSourceProperty { get; };
|
||||
|
||||
event Windows.Foundation.TypedEventHandler<SettingContainer, Object> ClearSettingValue;
|
||||
};
|
||||
}
|
||||
|
||||
@ -27,10 +27,6 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SettingContainerOverrideTextStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontStyle" Value="Italic"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="local:SettingContainer">
|
||||
<Setter Property="Margin" Value="0,24,0,0"/>
|
||||
<Setter Property="IsTabStop" Value="False"/>
|
||||
@ -51,10 +47,6 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
|
||||
<!--This is where the actual setting control will go-->
|
||||
<ContentPresenter Content="{TemplateBinding Content}"/>
|
||||
|
||||
<!--The text displayed when a setting is being overridden-->
|
||||
<TextBlock x:Name="OverrideMessage"
|
||||
Style="{StaticResource SettingContainerOverrideTextStyle}"/>
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
||||
@ -65,10 +65,10 @@ public: \
|
||||
{ \
|
||||
_NotifyChanges(L"Has" #name, L#name); \
|
||||
} \
|
||||
}
|
||||
} \
|
||||
auto name##OverrideSource() { return target.name##OverrideSource(); }
|
||||
|
||||
// Defines a setting that reflects another object's same-named
|
||||
// setting, but which cannot be erased.
|
||||
#define PERMANENT_OBSERVABLE_PROJECTED_SETTING(target, name) \
|
||||
_BASE_OBSERVABLE_PROJECTED_SETTING(target, name) \
|
||||
void Clear##name() {}
|
||||
_BASE_OBSERVABLE_PROJECTED_SETTING(target, name)
|
||||
|
||||
@ -3,11 +3,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define OBSERVABLE_PROJECTED_SETTING(Type, Name) \
|
||||
#define _BASE_OBSERVABLE_PROJECTED_SETTING(Type, Name) \
|
||||
Type Name \
|
||||
{ \
|
||||
get; \
|
||||
set; \
|
||||
}; \
|
||||
Boolean Has##Name { get; }; \
|
||||
Boolean Has##Name { get; }
|
||||
|
||||
#define OBSERVABLE_PROJECTED_SETTING(Type, Name) \
|
||||
_BASE_OBSERVABLE_PROJECTED_SETTING(Type, Name); \
|
||||
void Clear##Name()
|
||||
|
||||
#define PERMANENT_OBSERVABLE_PROJECTED_SETTING(Type, Name) \
|
||||
_BASE_OBSERVABLE_PROJECTED_SETTING(Type, Name)
|
||||
|
||||
@ -374,6 +374,13 @@ winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings CascadiaSettings::
|
||||
resultPtr->_ResolveDefaultProfile();
|
||||
resultPtr->_UpdateActiveProfiles();
|
||||
|
||||
// tag these profiles as in-box
|
||||
for (const auto& profile : resultPtr->AllProfiles())
|
||||
{
|
||||
const auto& profileImpl{ winrt::get_self<implementation::Profile>(profile) };
|
||||
profileImpl->Origin(OriginTag::InBox);
|
||||
}
|
||||
|
||||
return *resultPtr;
|
||||
}
|
||||
|
||||
@ -590,6 +597,8 @@ void CascadiaSettings::_ParseAndLayerFragmentFiles(const std::unordered_set<std:
|
||||
// (we add a new inheritance layer)
|
||||
auto childImpl{ matchingProfile->CreateChild() };
|
||||
childImpl->LayerJson(profileStub);
|
||||
childImpl->Origin(OriginTag::Fragment);
|
||||
childImpl->Source(source);
|
||||
|
||||
// replace parent in _profiles with child
|
||||
_allProfiles.SetAt(_FindMatchingProfileIndex(matchingProfile->ToJson()).value(), *childImpl);
|
||||
@ -606,6 +615,7 @@ void CascadiaSettings::_ParseAndLayerFragmentFiles(const std::unordered_set<std:
|
||||
// We don't make modifications to the user's settings file yet, that will happen when
|
||||
// _AppendDynamicProfilesToUserSettings() is called later
|
||||
newProfile->Source(source);
|
||||
newProfile->Origin(OriginTag::Fragment);
|
||||
_allProfiles.Append(*newProfile);
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,14 +20,15 @@ winrt::Microsoft::Terminal::Settings::Model::Profile CreateDefaultProfile(const
|
||||
const winrt::guid profileGuid{ Microsoft::Console::Utils::CreateV5Uuid(TERMINAL_PROFILE_NAMESPACE_GUID,
|
||||
gsl::as_bytes(gsl::make_span(name))) };
|
||||
|
||||
auto newProfile = winrt::make<winrt::Microsoft::Terminal::Settings::Model::implementation::Profile>(profileGuid);
|
||||
newProfile.Name(name);
|
||||
auto newProfile = winrt::make_self<winrt::Microsoft::Terminal::Settings::Model::implementation::Profile>(profileGuid);
|
||||
newProfile->Name(winrt::hstring{ name });
|
||||
|
||||
std::wstring iconPath{ PACKAGED_PROFILE_ICON_PATH };
|
||||
iconPath.append(Microsoft::Console::Utils::GuidToString(profileGuid));
|
||||
iconPath.append(PACKAGED_PROFILE_ICON_EXTENSION);
|
||||
|
||||
newProfile.Icon(iconPath);
|
||||
newProfile->Icon(winrt::hstring{ iconPath });
|
||||
newProfile->Origin(winrt::Microsoft::Terminal::Settings::Model::OriginTag::Generated);
|
||||
|
||||
return newProfile;
|
||||
return *newProfile;
|
||||
}
|
||||
|
||||
@ -62,34 +62,34 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||
void UnparsedDefaultProfile(const hstring& value);
|
||||
void ClearUnparsedDefaultProfile();
|
||||
|
||||
GETSET_SETTING(int32_t, InitialRows, DEFAULT_ROWS);
|
||||
GETSET_SETTING(int32_t, InitialCols, DEFAULT_COLS);
|
||||
GETSET_SETTING(bool, AlwaysShowTabs, true);
|
||||
GETSET_SETTING(bool, ShowTitleInTitlebar, true);
|
||||
GETSET_SETTING(bool, ConfirmCloseAllTabs, true);
|
||||
GETSET_SETTING(winrt::Windows::UI::Xaml::ElementTheme, Theme, winrt::Windows::UI::Xaml::ElementTheme::Default);
|
||||
GETSET_SETTING(winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode, TabWidthMode, winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode::Equal);
|
||||
GETSET_SETTING(bool, ShowTabsInTitlebar, true);
|
||||
GETSET_SETTING(hstring, WordDelimiters, DEFAULT_WORD_DELIMITERS);
|
||||
GETSET_SETTING(bool, CopyOnSelect, false);
|
||||
GETSET_SETTING(winrt::Microsoft::Terminal::TerminalControl::CopyFormat, CopyFormatting, 0);
|
||||
GETSET_SETTING(bool, WarnAboutLargePaste, true);
|
||||
GETSET_SETTING(bool, WarnAboutMultiLinePaste, true);
|
||||
GETSET_SETTING(Model::LaunchPosition, InitialPosition, nullptr, nullptr);
|
||||
GETSET_SETTING(bool, CenterOnLaunch, false);
|
||||
GETSET_SETTING(Model::LaunchMode, LaunchMode, LaunchMode::DefaultMode);
|
||||
GETSET_SETTING(bool, SnapToGridOnResize, true);
|
||||
GETSET_SETTING(bool, ForceFullRepaintRendering, false);
|
||||
GETSET_SETTING(bool, SoftwareRendering, false);
|
||||
GETSET_SETTING(bool, ForceVTInput, false);
|
||||
GETSET_SETTING(bool, DebugFeaturesEnabled, _getDefaultDebugFeaturesValue());
|
||||
GETSET_SETTING(bool, StartOnUserLogin, false);
|
||||
GETSET_SETTING(bool, AlwaysOnTop, false);
|
||||
GETSET_SETTING(Model::TabSwitcherMode, TabSwitcherMode, Model::TabSwitcherMode::InOrder);
|
||||
GETSET_SETTING(bool, DisableAnimations, false);
|
||||
GETSET_SETTING(hstring, StartupActions, L"");
|
||||
GETSET_SETTING(bool, FocusFollowMouse, false);
|
||||
GETSET_SETTING(Model::WindowingMode, WindowingBehavior, Model::WindowingMode::UseNew);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, int32_t, InitialRows, DEFAULT_ROWS);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, int32_t, InitialCols, DEFAULT_COLS);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, AlwaysShowTabs, true);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, ShowTitleInTitlebar, true);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, ConfirmCloseAllTabs, true);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, winrt::Windows::UI::Xaml::ElementTheme, Theme, winrt::Windows::UI::Xaml::ElementTheme::Default);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode, TabWidthMode, winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode::Equal);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, ShowTabsInTitlebar, true);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, hstring, WordDelimiters, DEFAULT_WORD_DELIMITERS);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, CopyOnSelect, false);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, winrt::Microsoft::Terminal::TerminalControl::CopyFormat, CopyFormatting, 0);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, WarnAboutLargePaste, true);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, WarnAboutMultiLinePaste, true);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, Model::LaunchPosition, InitialPosition, nullptr, nullptr);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, CenterOnLaunch, false);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, Model::LaunchMode, LaunchMode, LaunchMode::DefaultMode);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, SnapToGridOnResize, true);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, ForceFullRepaintRendering, false);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, SoftwareRendering, false);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, ForceVTInput, false);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, DebugFeaturesEnabled, _getDefaultDebugFeaturesValue());
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, StartOnUserLogin, false);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, AlwaysOnTop, false);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, Model::TabSwitcherMode, TabSwitcherMode, Model::TabSwitcherMode::InOrder);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, DisableAnimations, false);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, hstring, StartupActions, L"");
|
||||
GETSET_SETTING(Model::GlobalAppSettings, bool, FocusFollowMouse, false);
|
||||
GETSET_SETTING(Model::GlobalAppSettings, Model::WindowingMode, WindowingBehavior, Model::WindowingMode::UseNew);
|
||||
|
||||
private:
|
||||
guid _defaultProfile;
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "IInheritable.idl.h"
|
||||
|
||||
import "ColorScheme.idl";
|
||||
import "KeyMapping.idl";
|
||||
import "Command.idl";
|
||||
@ -42,109 +44,36 @@ namespace Microsoft.Terminal.Settings.Model
|
||||
|
||||
[default_interface] runtimeclass GlobalAppSettings {
|
||||
Guid DefaultProfile;
|
||||
Boolean HasUnparsedDefaultProfile();
|
||||
void ClearUnparsedDefaultProfile();
|
||||
String UnparsedDefaultProfile;
|
||||
INHERITABLE_SETTING(String, UnparsedDefaultProfile);
|
||||
|
||||
Boolean HasInitialRows();
|
||||
void ClearInitialRows();
|
||||
Int32 InitialRows;
|
||||
|
||||
Boolean HasInitialCols();
|
||||
void ClearInitialCols();
|
||||
Int32 InitialCols;
|
||||
|
||||
Boolean HasAlwaysShowTabs();
|
||||
void ClearAlwaysShowTabs();
|
||||
Boolean AlwaysShowTabs;
|
||||
|
||||
Boolean HasShowTitleInTitlebar();
|
||||
void ClearShowTitleInTitlebar();
|
||||
Boolean ShowTitleInTitlebar;
|
||||
|
||||
Boolean HasConfirmCloseAllTabs();
|
||||
void ClearConfirmCloseAllTabs();
|
||||
Boolean ConfirmCloseAllTabs;
|
||||
|
||||
Boolean HasTheme();
|
||||
void ClearTheme();
|
||||
Windows.UI.Xaml.ElementTheme Theme;
|
||||
|
||||
Boolean HasTabWidthMode();
|
||||
void ClearTabWidthMode();
|
||||
Microsoft.UI.Xaml.Controls.TabViewWidthMode TabWidthMode;
|
||||
|
||||
Boolean HasShowTabsInTitlebar();
|
||||
void ClearShowTabsInTitlebar();
|
||||
Boolean ShowTabsInTitlebar;
|
||||
|
||||
Boolean HasWordDelimiters();
|
||||
void ClearWordDelimiters();
|
||||
String WordDelimiters;
|
||||
|
||||
Boolean HasCopyOnSelect();
|
||||
void ClearCopyOnSelect();
|
||||
Boolean CopyOnSelect;
|
||||
|
||||
Boolean HasCopyFormatting();
|
||||
void ClearCopyFormatting();
|
||||
Microsoft.Terminal.TerminalControl.CopyFormat CopyFormatting;
|
||||
|
||||
Boolean HasWarnAboutLargePaste();
|
||||
void ClearWarnAboutLargePaste();
|
||||
Boolean WarnAboutLargePaste;
|
||||
|
||||
Boolean HasWarnAboutMultiLinePaste();
|
||||
void ClearWarnAboutMultiLinePaste();
|
||||
Boolean WarnAboutMultiLinePaste;
|
||||
|
||||
Boolean HasInitialPosition();
|
||||
void ClearInitialPosition();
|
||||
LaunchPosition InitialPosition;
|
||||
|
||||
Boolean HasCenterOnLaunch();
|
||||
void ClearCenterOnLaunch();
|
||||
Boolean CenterOnLaunch;
|
||||
|
||||
Boolean HasLaunchMode();
|
||||
void ClearLaunchMode();
|
||||
LaunchMode LaunchMode;
|
||||
|
||||
Boolean HasSnapToGridOnResize();
|
||||
void ClearSnapToGridOnResize();
|
||||
Boolean SnapToGridOnResize;
|
||||
|
||||
Boolean HasForceFullRepaintRendering();
|
||||
void ClearForceFullRepaintRendering();
|
||||
Boolean ForceFullRepaintRendering;
|
||||
|
||||
Boolean HasSoftwareRendering();
|
||||
void ClearSoftwareRendering();
|
||||
Boolean SoftwareRendering;
|
||||
|
||||
Boolean HasForceVTInput();
|
||||
void ClearForceVTInput();
|
||||
Boolean ForceVTInput;
|
||||
|
||||
Boolean HasDebugFeaturesEnabled();
|
||||
void ClearDebugFeaturesEnabled();
|
||||
Boolean DebugFeaturesEnabled;
|
||||
|
||||
Boolean HasStartOnUserLogin();
|
||||
void ClearStartOnUserLogin();
|
||||
Boolean StartOnUserLogin;
|
||||
|
||||
Boolean HasAlwaysOnTop();
|
||||
void ClearAlwaysOnTop();
|
||||
Boolean AlwaysOnTop;
|
||||
|
||||
Boolean HasTabSwitcherMode();
|
||||
void ClearTabSwitcherMode();
|
||||
TabSwitcherMode TabSwitcherMode;
|
||||
|
||||
Boolean HasDisableAnimations();
|
||||
void ClearDisableAnimations();
|
||||
Boolean DisableAnimations;
|
||||
INHERITABLE_SETTING(Int32, InitialRows);
|
||||
INHERITABLE_SETTING(Int32, InitialCols);
|
||||
INHERITABLE_SETTING(Boolean, AlwaysShowTabs);
|
||||
INHERITABLE_SETTING(Boolean, ShowTitleInTitlebar);
|
||||
INHERITABLE_SETTING(Boolean, ConfirmCloseAllTabs);
|
||||
INHERITABLE_SETTING(Windows.UI.Xaml.ElementTheme, Theme);
|
||||
INHERITABLE_SETTING(Microsoft.UI.Xaml.Controls.TabViewWidthMode, TabWidthMode);
|
||||
INHERITABLE_SETTING(Boolean, ShowTabsInTitlebar);
|
||||
INHERITABLE_SETTING(String, WordDelimiters);
|
||||
INHERITABLE_SETTING(Boolean, CopyOnSelect);
|
||||
INHERITABLE_SETTING(Microsoft.Terminal.TerminalControl.CopyFormat, CopyFormatting);
|
||||
INHERITABLE_SETTING(Boolean, WarnAboutLargePaste);
|
||||
INHERITABLE_SETTING(Boolean, WarnAboutMultiLinePaste);
|
||||
INHERITABLE_SETTING(LaunchPosition, InitialPosition);
|
||||
INHERITABLE_SETTING(Boolean, CenterOnLaunch);
|
||||
INHERITABLE_SETTING(LaunchMode, LaunchMode);
|
||||
INHERITABLE_SETTING(Boolean, SnapToGridOnResize);
|
||||
INHERITABLE_SETTING(Boolean, ForceFullRepaintRendering);
|
||||
INHERITABLE_SETTING(Boolean, SoftwareRendering);
|
||||
INHERITABLE_SETTING(Boolean, ForceVTInput);
|
||||
INHERITABLE_SETTING(Boolean, DebugFeaturesEnabled);
|
||||
INHERITABLE_SETTING(Boolean, StartOnUserLogin);
|
||||
INHERITABLE_SETTING(Boolean, AlwaysOnTop);
|
||||
INHERITABLE_SETTING(TabSwitcherMode, TabSwitcherMode);
|
||||
INHERITABLE_SETTING(Boolean, DisableAnimations);
|
||||
INHERITABLE_SETTING(String, StartupActions);
|
||||
INHERITABLE_SETTING(Boolean, FocusFollowMouse);
|
||||
INHERITABLE_SETTING(WindowingMode, WindowingBehavior);
|
||||
|
||||
Windows.Foundation.Collections.IMapView<String, ColorScheme> ColorSchemes();
|
||||
void AddColorScheme(ColorScheme scheme);
|
||||
@ -153,17 +82,5 @@ namespace Microsoft.Terminal.Settings.Model
|
||||
KeyMapping KeyMap();
|
||||
|
||||
Windows.Foundation.Collections.IMapView<String, Command> Commands();
|
||||
|
||||
Boolean HasStartupActions();
|
||||
void ClearStartupActions();
|
||||
String StartupActions();
|
||||
|
||||
Boolean HasFocusFollowMouse();
|
||||
void ClearFocusFollowMouse();
|
||||
Boolean FocusFollowMouse;
|
||||
|
||||
Boolean HasWindowingBehavior();
|
||||
void ClearWindowingBehavior();
|
||||
WindowingMode WindowingBehavior;
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,12 +83,13 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||
// Use this macro to quickly implement both getters and the setter for an
|
||||
// inheritable setting property. This is similar to the GETSET_PROPERTY macro, except...
|
||||
// - Has(): checks if the user explicitly set a value for this setting
|
||||
// - SourceGetter(): return the object that provides the resolved value
|
||||
// - Getter(): return the resolved value
|
||||
// - Setter(): set the value directly
|
||||
// - Clear(): clear the user set value
|
||||
// - the setting is saved as an optional, where nullopt means
|
||||
// that we must inherit the value from our parent
|
||||
#define GETSET_SETTING(type, name, ...) \
|
||||
#define GETSET_SETTING(projectedType, type, name, ...) \
|
||||
public: \
|
||||
/* Returns true if the user explicitly set the value, false otherwise*/ \
|
||||
bool Has##name() const \
|
||||
@ -96,6 +97,22 @@ public: \
|
||||
return _##name.has_value(); \
|
||||
} \
|
||||
\
|
||||
projectedType name##OverrideSource() \
|
||||
{ \
|
||||
/*user set value was not set*/ \
|
||||
/*iterate through parents to find one with a value*/ \
|
||||
for (auto& parent : _parents) \
|
||||
{ \
|
||||
if (auto source{ parent->_get##name##OverrideSourceImpl() }) \
|
||||
{ \
|
||||
return source; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
/*no value was found*/ \
|
||||
return nullptr; \
|
||||
} \
|
||||
\
|
||||
/* Returns the resolved value for this setting */ \
|
||||
/* fallback: user set value --> inherited value --> system set value */ \
|
||||
type name() const \
|
||||
@ -138,13 +155,34 @@ private: \
|
||||
\
|
||||
/*no value was found*/ \
|
||||
return std::nullopt; \
|
||||
} \
|
||||
projectedType _get##name##OverrideSourceImpl() const \
|
||||
{ \
|
||||
/*we have a value*/ \
|
||||
if (_##name) \
|
||||
{ \
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
/*user set value was not set*/ \
|
||||
/*iterate through parents to find one with a value*/ \
|
||||
for (auto& parent : _parents) \
|
||||
{ \
|
||||
if (auto source{ parent->_get##name##OverrideSourceImpl() }) \
|
||||
{ \
|
||||
return source; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
/*no value was found*/ \
|
||||
return nullptr; \
|
||||
}
|
||||
|
||||
// This macro is similar to the one above, but is reserved for optional settings
|
||||
// like Profile.Foreground (where null is interpreted
|
||||
// as an acceptable value, rather than "inherit")
|
||||
// "type" is exposed as an IReference
|
||||
#define GETSET_NULLABLE_SETTING(type, name, ...) \
|
||||
#define GETSET_NULLABLE_SETTING(projectedType, type, name, ...) \
|
||||
public: \
|
||||
/* Returns true if the user explicitly set the value, false otherwise*/ \
|
||||
bool Has##name() const \
|
||||
@ -152,6 +190,22 @@ public: \
|
||||
return _##name.has_value(); \
|
||||
} \
|
||||
\
|
||||
projectedType name##OverrideSource() \
|
||||
{ \
|
||||
/*user set value was not set*/ \
|
||||
/*iterate through parents to find one with a value*/ \
|
||||
for (auto parent : _parents) \
|
||||
{ \
|
||||
if (auto source{ parent->_get##name##OverrideSourceImpl() }) \
|
||||
{ \
|
||||
return source; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
/*no source was found*/ \
|
||||
return nullptr; \
|
||||
} \
|
||||
\
|
||||
/* Returns the resolved value for this setting */ \
|
||||
/* fallback: user set value --> inherited value --> system set value */ \
|
||||
winrt::Windows::Foundation::IReference<type> name() const \
|
||||
@ -210,4 +264,25 @@ private: \
|
||||
\
|
||||
/*no value was found*/ \
|
||||
return std::nullopt; \
|
||||
} \
|
||||
projectedType _get##name##OverrideSourceImpl() const \
|
||||
{ \
|
||||
/*we have a value*/ \
|
||||
if (_##name) \
|
||||
{ \
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
/*user set value was not set*/ \
|
||||
/*iterate through parents to find one with a value*/ \
|
||||
for (auto& parent : _parents) \
|
||||
{ \
|
||||
if (auto source{ parent->_get##name##OverrideSourceImpl() }) \
|
||||
{ \
|
||||
return source; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
/*no value was found*/ \
|
||||
return nullptr; \
|
||||
}
|
||||
|
||||
16
src/cascadia/TerminalSettingsModel/IInheritable.idl.h
Normal file
16
src/cascadia/TerminalSettingsModel/IInheritable.idl.h
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#pragma once
|
||||
|
||||
#define _BASE_INHERITABLE_SETTING(Type, Name) \
|
||||
Type Name \
|
||||
{ \
|
||||
get; \
|
||||
set; \
|
||||
}; \
|
||||
Boolean Has##Name { get; }; \
|
||||
void Clear##Name()
|
||||
|
||||
#define INHERITABLE_SETTING(Type, Name) \
|
||||
_BASE_INHERITABLE_SETTING(Type, Name)
|
||||
@ -113,6 +113,7 @@ winrt::com_ptr<Profile> Profile::CopySettings(winrt::com_ptr<Profile> source)
|
||||
profile->_PixelShaderPath = source->_PixelShaderPath;
|
||||
profile->_BackgroundImageAlignment = source->_BackgroundImageAlignment;
|
||||
profile->_ConnectionType = source->_ConnectionType;
|
||||
profile->_Origin = source->_Origin;
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
@ -67,58 +67,60 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||
hstring ExpandedBackgroundImagePath() const;
|
||||
static guid GetGuidOrGenerateForJson(const Json::Value& json) noexcept;
|
||||
|
||||
GETSET_SETTING(guid, Guid, _GenerateGuidForProfile(Name(), Source()));
|
||||
GETSET_SETTING(hstring, Name, L"Default");
|
||||
GETSET_SETTING(hstring, Source);
|
||||
GETSET_SETTING(bool, Hidden, false);
|
||||
GETSET_SETTING(guid, ConnectionType);
|
||||
GETSET_PROPERTY(OriginTag, Origin, OriginTag::Custom);
|
||||
|
||||
GETSET_SETTING(Model::Profile, guid, Guid, _GenerateGuidForProfile(Name(), Source()));
|
||||
GETSET_SETTING(Model::Profile, hstring, Name, L"Default");
|
||||
GETSET_SETTING(Model::Profile, hstring, Source);
|
||||
GETSET_SETTING(Model::Profile, bool, Hidden, false);
|
||||
GETSET_SETTING(Model::Profile, guid, ConnectionType);
|
||||
|
||||
// Default Icon: Segoe MDL2 CommandPrompt icon
|
||||
GETSET_SETTING(hstring, Icon, L"\uE756");
|
||||
GETSET_SETTING(Model::Profile, hstring, Icon, L"\uE756");
|
||||
|
||||
GETSET_SETTING(CloseOnExitMode, CloseOnExit, CloseOnExitMode::Graceful);
|
||||
GETSET_SETTING(hstring, TabTitle);
|
||||
GETSET_NULLABLE_SETTING(Windows::UI::Color, TabColor, nullptr);
|
||||
GETSET_SETTING(bool, SuppressApplicationTitle, false);
|
||||
GETSET_SETTING(Model::Profile, CloseOnExitMode, CloseOnExit, CloseOnExitMode::Graceful);
|
||||
GETSET_SETTING(Model::Profile, hstring, TabTitle);
|
||||
GETSET_NULLABLE_SETTING(Model::Profile, Windows::UI::Color, TabColor, nullptr);
|
||||
GETSET_SETTING(Model::Profile, bool, SuppressApplicationTitle, false);
|
||||
|
||||
GETSET_SETTING(bool, UseAcrylic, false);
|
||||
GETSET_SETTING(double, AcrylicOpacity, 0.5);
|
||||
GETSET_SETTING(Microsoft::Terminal::TerminalControl::ScrollbarState, ScrollState, Microsoft::Terminal::TerminalControl::ScrollbarState::Visible);
|
||||
GETSET_SETTING(Model::Profile, bool, UseAcrylic, false);
|
||||
GETSET_SETTING(Model::Profile, double, AcrylicOpacity, 0.5);
|
||||
GETSET_SETTING(Model::Profile, Microsoft::Terminal::TerminalControl::ScrollbarState, ScrollState, Microsoft::Terminal::TerminalControl::ScrollbarState::Visible);
|
||||
|
||||
GETSET_SETTING(hstring, FontFace, DEFAULT_FONT_FACE);
|
||||
GETSET_SETTING(int32_t, FontSize, DEFAULT_FONT_SIZE);
|
||||
GETSET_SETTING(Windows::UI::Text::FontWeight, FontWeight, DEFAULT_FONT_WEIGHT);
|
||||
GETSET_SETTING(hstring, Padding, DEFAULT_PADDING);
|
||||
GETSET_SETTING(Model::Profile, hstring, FontFace, DEFAULT_FONT_FACE);
|
||||
GETSET_SETTING(Model::Profile, int32_t, FontSize, DEFAULT_FONT_SIZE);
|
||||
GETSET_SETTING(Model::Profile, Windows::UI::Text::FontWeight, FontWeight, DEFAULT_FONT_WEIGHT);
|
||||
GETSET_SETTING(Model::Profile, hstring, Padding, DEFAULT_PADDING);
|
||||
|
||||
GETSET_SETTING(hstring, Commandline, L"cmd.exe");
|
||||
GETSET_SETTING(hstring, StartingDirectory);
|
||||
GETSET_SETTING(Model::Profile, hstring, Commandline, L"cmd.exe");
|
||||
GETSET_SETTING(Model::Profile, hstring, StartingDirectory);
|
||||
|
||||
GETSET_SETTING(hstring, BackgroundImagePath);
|
||||
GETSET_SETTING(double, BackgroundImageOpacity, 1.0);
|
||||
GETSET_SETTING(Windows::UI::Xaml::Media::Stretch, BackgroundImageStretchMode, Windows::UI::Xaml::Media::Stretch::UniformToFill);
|
||||
GETSET_SETTING(ConvergedAlignment, BackgroundImageAlignment, ConvergedAlignment::Horizontal_Center | ConvergedAlignment::Vertical_Center);
|
||||
GETSET_SETTING(Model::Profile, hstring, BackgroundImagePath);
|
||||
GETSET_SETTING(Model::Profile, double, BackgroundImageOpacity, 1.0);
|
||||
GETSET_SETTING(Model::Profile, Windows::UI::Xaml::Media::Stretch, BackgroundImageStretchMode, Windows::UI::Xaml::Media::Stretch::UniformToFill);
|
||||
GETSET_SETTING(Model::Profile, ConvergedAlignment, BackgroundImageAlignment, ConvergedAlignment::Horizontal_Center | ConvergedAlignment::Vertical_Center);
|
||||
|
||||
GETSET_SETTING(Microsoft::Terminal::TerminalControl::TextAntialiasingMode, AntialiasingMode, Microsoft::Terminal::TerminalControl::TextAntialiasingMode::Grayscale);
|
||||
GETSET_SETTING(bool, RetroTerminalEffect, false);
|
||||
GETSET_SETTING(hstring, PixelShaderPath, L"");
|
||||
GETSET_SETTING(bool, ForceFullRepaintRendering, false);
|
||||
GETSET_SETTING(bool, SoftwareRendering, false);
|
||||
GETSET_SETTING(Model::Profile, Microsoft::Terminal::TerminalControl::TextAntialiasingMode, AntialiasingMode, Microsoft::Terminal::TerminalControl::TextAntialiasingMode::Grayscale);
|
||||
GETSET_SETTING(Model::Profile, bool, RetroTerminalEffect, false);
|
||||
GETSET_SETTING(Model::Profile, hstring, PixelShaderPath, L"");
|
||||
GETSET_SETTING(Model::Profile, bool, ForceFullRepaintRendering, false);
|
||||
GETSET_SETTING(Model::Profile, bool, SoftwareRendering, false);
|
||||
|
||||
GETSET_SETTING(hstring, ColorSchemeName, L"Campbell");
|
||||
GETSET_SETTING(Model::Profile, hstring, ColorSchemeName, L"Campbell");
|
||||
|
||||
GETSET_NULLABLE_SETTING(Windows::UI::Color, Foreground, nullptr);
|
||||
GETSET_NULLABLE_SETTING(Windows::UI::Color, Background, nullptr);
|
||||
GETSET_NULLABLE_SETTING(Windows::UI::Color, SelectionBackground, nullptr);
|
||||
GETSET_NULLABLE_SETTING(Windows::UI::Color, CursorColor, nullptr);
|
||||
GETSET_NULLABLE_SETTING(Model::Profile, Windows::UI::Color, Foreground, nullptr);
|
||||
GETSET_NULLABLE_SETTING(Model::Profile, Windows::UI::Color, Background, nullptr);
|
||||
GETSET_NULLABLE_SETTING(Model::Profile, Windows::UI::Color, SelectionBackground, nullptr);
|
||||
GETSET_NULLABLE_SETTING(Model::Profile, Windows::UI::Color, CursorColor, nullptr);
|
||||
|
||||
GETSET_SETTING(int32_t, HistorySize, DEFAULT_HISTORY_SIZE);
|
||||
GETSET_SETTING(bool, SnapOnInput, true);
|
||||
GETSET_SETTING(bool, AltGrAliasing, true);
|
||||
GETSET_SETTING(Model::Profile, int32_t, HistorySize, DEFAULT_HISTORY_SIZE);
|
||||
GETSET_SETTING(Model::Profile, bool, SnapOnInput, true);
|
||||
GETSET_SETTING(Model::Profile, bool, AltGrAliasing, true);
|
||||
|
||||
GETSET_SETTING(Microsoft::Terminal::TerminalControl::CursorStyle, CursorShape, Microsoft::Terminal::TerminalControl::CursorStyle::Bar);
|
||||
GETSET_SETTING(uint32_t, CursorHeight, DEFAULT_CURSOR_HEIGHT);
|
||||
GETSET_SETTING(Model::Profile, Microsoft::Terminal::TerminalControl::CursorStyle, CursorShape, Microsoft::Terminal::TerminalControl::CursorStyle::Bar);
|
||||
GETSET_SETTING(Model::Profile, uint32_t, CursorHeight, DEFAULT_CURSOR_HEIGHT);
|
||||
|
||||
GETSET_SETTING(Model::BellStyle, BellStyle, BellStyle::Audible);
|
||||
GETSET_SETTING(Model::Profile, Model::BellStyle, BellStyle, BellStyle::Audible);
|
||||
|
||||
private:
|
||||
static std::wstring EvaluateStartingDirectory(const std::wstring& directory);
|
||||
|
||||
@ -1,8 +1,23 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "IInheritable.idl.h"
|
||||
|
||||
#define INHERITABLE_PROFILE_SETTING(Type, Name) \
|
||||
_BASE_INHERITABLE_SETTING(Type, Name); \
|
||||
Microsoft.Terminal.Settings.Model.Profile Name##OverrideSource { get; }
|
||||
|
||||
namespace Microsoft.Terminal.Settings.Model
|
||||
{
|
||||
// This tag is used to identify the context in which the Profile was created
|
||||
enum OriginTag
|
||||
{
|
||||
Custom = 0,
|
||||
InBox,
|
||||
Generated,
|
||||
Fragment
|
||||
};
|
||||
|
||||
enum CloseOnExitMode
|
||||
{
|
||||
Never = 0,
|
||||
@ -35,160 +50,57 @@ namespace Microsoft.Terminal.Settings.Model
|
||||
Profile();
|
||||
Profile(Guid guid);
|
||||
|
||||
Boolean HasName();
|
||||
void ClearName();
|
||||
String Name;
|
||||
OriginTag Origin { get; };
|
||||
|
||||
INHERITABLE_PROFILE_SETTING(String, Name);
|
||||
|
||||
Boolean HasGuid();
|
||||
Guid Guid;
|
||||
|
||||
Boolean HasSource();
|
||||
void ClearSource();
|
||||
String Source;
|
||||
INHERITABLE_PROFILE_SETTING(String, Source);
|
||||
|
||||
Boolean HasConnectionType();
|
||||
Guid ConnectionType;
|
||||
|
||||
Boolean HasHidden();
|
||||
void ClearHidden();
|
||||
Boolean Hidden;
|
||||
INHERITABLE_PROFILE_SETTING(Boolean, Hidden);
|
||||
INHERITABLE_PROFILE_SETTING(String, Icon);
|
||||
INHERITABLE_PROFILE_SETTING(CloseOnExitMode, CloseOnExit);
|
||||
INHERITABLE_PROFILE_SETTING(String, TabTitle);
|
||||
INHERITABLE_PROFILE_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, TabColor);
|
||||
INHERITABLE_PROFILE_SETTING(Boolean, SuppressApplicationTitle);
|
||||
INHERITABLE_PROFILE_SETTING(Boolean, UseAcrylic);
|
||||
INHERITABLE_PROFILE_SETTING(Double, AcrylicOpacity);
|
||||
INHERITABLE_PROFILE_SETTING(Microsoft.Terminal.TerminalControl.ScrollbarState, ScrollState);
|
||||
INHERITABLE_PROFILE_SETTING(String, FontFace);
|
||||
INHERITABLE_PROFILE_SETTING(Int32, FontSize);
|
||||
INHERITABLE_PROFILE_SETTING(Windows.UI.Text.FontWeight, FontWeight);
|
||||
INHERITABLE_PROFILE_SETTING(String, Padding);
|
||||
INHERITABLE_PROFILE_SETTING(String, Commandline);
|
||||
|
||||
Boolean HasIcon();
|
||||
void ClearIcon();
|
||||
String Icon;
|
||||
|
||||
Boolean HasCloseOnExit();
|
||||
void ClearCloseOnExit();
|
||||
CloseOnExitMode CloseOnExit;
|
||||
|
||||
Boolean HasTabTitle();
|
||||
void ClearTabTitle();
|
||||
String TabTitle;
|
||||
|
||||
Boolean HasTabColor();
|
||||
void ClearTabColor();
|
||||
Windows.Foundation.IReference<Windows.UI.Color> TabColor;
|
||||
|
||||
Boolean HasSuppressApplicationTitle();
|
||||
void ClearSuppressApplicationTitle();
|
||||
Boolean SuppressApplicationTitle;
|
||||
|
||||
Boolean HasUseAcrylic();
|
||||
void ClearUseAcrylic();
|
||||
Boolean UseAcrylic;
|
||||
|
||||
Boolean HasAcrylicOpacity();
|
||||
void ClearAcrylicOpacity();
|
||||
Double AcrylicOpacity;
|
||||
|
||||
Boolean HasScrollState();
|
||||
void ClearScrollState();
|
||||
Microsoft.Terminal.TerminalControl.ScrollbarState ScrollState;
|
||||
|
||||
Boolean HasFontFace();
|
||||
void ClearFontFace();
|
||||
String FontFace;
|
||||
|
||||
Boolean HasFontSize();
|
||||
void ClearFontSize();
|
||||
Int32 FontSize;
|
||||
|
||||
Boolean HasFontWeight();
|
||||
void ClearFontWeight();
|
||||
Windows.UI.Text.FontWeight FontWeight;
|
||||
|
||||
Boolean HasPadding();
|
||||
void ClearPadding();
|
||||
String Padding;
|
||||
|
||||
Boolean HasCommandline();
|
||||
void ClearCommandline();
|
||||
String Commandline;
|
||||
|
||||
Boolean HasStartingDirectory();
|
||||
void ClearStartingDirectory();
|
||||
String StartingDirectory;
|
||||
INHERITABLE_PROFILE_SETTING(String, StartingDirectory);
|
||||
String EvaluatedStartingDirectory { get; };
|
||||
|
||||
Boolean HasBackgroundImagePath();
|
||||
void ClearBackgroundImagePath();
|
||||
String BackgroundImagePath;
|
||||
INHERITABLE_PROFILE_SETTING(String, BackgroundImagePath);
|
||||
String ExpandedBackgroundImagePath { get; };
|
||||
|
||||
Boolean HasBackgroundImageOpacity();
|
||||
void ClearBackgroundImageOpacity();
|
||||
Double BackgroundImageOpacity;
|
||||
|
||||
Boolean HasBackgroundImageStretchMode();
|
||||
void ClearBackgroundImageStretchMode();
|
||||
Windows.UI.Xaml.Media.Stretch BackgroundImageStretchMode;
|
||||
|
||||
Boolean HasBackgroundImageAlignment();
|
||||
void ClearBackgroundImageAlignment();
|
||||
ConvergedAlignment BackgroundImageAlignment;
|
||||
|
||||
Boolean HasAntialiasingMode();
|
||||
void ClearAntialiasingMode();
|
||||
Microsoft.Terminal.TerminalControl.TextAntialiasingMode AntialiasingMode;
|
||||
|
||||
Boolean HasRetroTerminalEffect();
|
||||
void ClearRetroTerminalEffect();
|
||||
Boolean RetroTerminalEffect;
|
||||
|
||||
Boolean HasPixelShaderPath();
|
||||
void ClearPixelShaderPath();
|
||||
String PixelShaderPath;
|
||||
|
||||
Boolean HasForceFullRepaintRendering();
|
||||
void ClearForceFullRepaintRendering();
|
||||
Boolean ForceFullRepaintRendering;
|
||||
|
||||
Boolean HasSoftwareRendering();
|
||||
void ClearSoftwareRendering();
|
||||
Boolean SoftwareRendering;
|
||||
|
||||
Boolean HasColorSchemeName();
|
||||
void ClearColorSchemeName();
|
||||
String ColorSchemeName;
|
||||
|
||||
Boolean HasForeground();
|
||||
void ClearForeground();
|
||||
Windows.Foundation.IReference<Windows.UI.Color> Foreground;
|
||||
|
||||
Boolean HasBackground();
|
||||
void ClearBackground();
|
||||
Windows.Foundation.IReference<Windows.UI.Color> Background;
|
||||
|
||||
Boolean HasSelectionBackground();
|
||||
void ClearSelectionBackground();
|
||||
Windows.Foundation.IReference<Windows.UI.Color> SelectionBackground;
|
||||
|
||||
Boolean HasCursorColor();
|
||||
void ClearCursorColor();
|
||||
Windows.Foundation.IReference<Windows.UI.Color> CursorColor;
|
||||
|
||||
Boolean HasHistorySize();
|
||||
void ClearHistorySize();
|
||||
Int32 HistorySize;
|
||||
|
||||
Boolean HasSnapOnInput();
|
||||
void ClearSnapOnInput();
|
||||
Boolean SnapOnInput;
|
||||
|
||||
Boolean HasAltGrAliasing();
|
||||
void ClearAltGrAliasing();
|
||||
Boolean AltGrAliasing;
|
||||
|
||||
Boolean HasCursorShape();
|
||||
void ClearCursorShape();
|
||||
Microsoft.Terminal.TerminalControl.CursorStyle CursorShape;
|
||||
|
||||
Boolean HasCursorHeight();
|
||||
void ClearCursorHeight();
|
||||
UInt32 CursorHeight;
|
||||
|
||||
Boolean HasBellStyle();
|
||||
void ClearBellStyle();
|
||||
BellStyle BellStyle;
|
||||
INHERITABLE_PROFILE_SETTING(Double, BackgroundImageOpacity);
|
||||
INHERITABLE_PROFILE_SETTING(Windows.UI.Xaml.Media.Stretch, BackgroundImageStretchMode);
|
||||
INHERITABLE_PROFILE_SETTING(ConvergedAlignment, BackgroundImageAlignment);
|
||||
INHERITABLE_PROFILE_SETTING(Microsoft.Terminal.TerminalControl.TextAntialiasingMode, AntialiasingMode);
|
||||
INHERITABLE_PROFILE_SETTING(Boolean, RetroTerminalEffect);
|
||||
INHERITABLE_PROFILE_SETTING(String, PixelShaderPath);
|
||||
INHERITABLE_PROFILE_SETTING(Boolean, ForceFullRepaintRendering);
|
||||
INHERITABLE_PROFILE_SETTING(Boolean, SoftwareRendering);
|
||||
INHERITABLE_PROFILE_SETTING(String, ColorSchemeName);
|
||||
INHERITABLE_PROFILE_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, Foreground);
|
||||
INHERITABLE_PROFILE_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, Background);
|
||||
INHERITABLE_PROFILE_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, SelectionBackground);
|
||||
INHERITABLE_PROFILE_SETTING(Windows.Foundation.IReference<Windows.UI.Color>, CursorColor);
|
||||
INHERITABLE_PROFILE_SETTING(Int32, HistorySize);
|
||||
INHERITABLE_PROFILE_SETTING(Boolean, SnapOnInput);
|
||||
INHERITABLE_PROFILE_SETTING(Boolean, AltGrAliasing);
|
||||
INHERITABLE_PROFILE_SETTING(Microsoft.Terminal.TerminalControl.CursorStyle, CursorShape);
|
||||
INHERITABLE_PROFILE_SETTING(UInt32, CursorHeight);
|
||||
INHERITABLE_PROFILE_SETTING(BellStyle, BellStyle);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user