mirror of
https://github.com/microsoft/terminal.git
synced 2026-07-08 17:46:05 +00:00
add unfocused appearance subpage
This commit is contained in:
@@ -69,6 +69,22 @@ namespace winrt::Microsoft::Terminal::Settings
|
||||
return settings;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Like CreateForPreview, but overlays the profile's unfocused appearance on top of the
|
||||
// resolved focused settings so the preview reflects the unfocused appearance. If the profile
|
||||
// has no unfocused appearance, this behaves like CreateForPreview (the focused appearance).
|
||||
winrt::com_ptr<TerminalSettings> TerminalSettings::CreateForPreviewUnfocused(const Model::CascadiaSettings& appSettings, const Model::Profile& profile)
|
||||
{
|
||||
const auto settings = _CreateWithProfileCommon(appSettings, profile);
|
||||
settings->_UseBackgroundImageForWindow = false;
|
||||
if (const auto& unfocusedAppearance{ profile.UnfocusedAppearance() })
|
||||
{
|
||||
const auto globals = appSettings.GlobalSettings();
|
||||
settings->_ApplyAppearanceSettings(unfocusedAppearance, globals.ColorSchemes(), globals.CurrentTheme());
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Create a TerminalSettingsCreateResult for the provided profile guid. We'll
|
||||
// use the guid to look up the profile that should be used to
|
||||
|
||||
@@ -58,6 +58,7 @@ namespace winrt::Microsoft::Terminal::Settings
|
||||
TerminalSettings() = default;
|
||||
|
||||
static winrt::com_ptr<TerminalSettings> CreateForPreview(const Model::CascadiaSettings& appSettings, const Model::Profile& profile);
|
||||
static winrt::com_ptr<TerminalSettings> CreateForPreviewUnfocused(const Model::CascadiaSettings& appSettings, const Model::Profile& profile);
|
||||
|
||||
static TerminalSettingsCreateResult CreateWithProfile(const Model::CascadiaSettings& appSettings,
|
||||
const Model::Profile& profile);
|
||||
|
||||
@@ -247,7 +247,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
}
|
||||
else if (viewModelProperty == L"DarkColorSchemeName" || viewModelProperty == L"LightColorSchemeName")
|
||||
{
|
||||
_NotifyChanges(L"CurrentColorScheme");
|
||||
_NotifyChanges(L"CurrentColorScheme", L"ColorScheme", L"HasColorScheme");
|
||||
}
|
||||
else if (viewModelProperty == L"CurrentColorScheme")
|
||||
{
|
||||
@@ -1010,6 +1010,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
void AppearanceViewModel::ClearColorScheme()
|
||||
{
|
||||
ClearDarkColorSchemeName();
|
||||
ClearLightColorSchemeName();
|
||||
_NotifyChanges(L"CurrentColorScheme");
|
||||
}
|
||||
|
||||
|
||||
@@ -155,30 +155,30 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
// dispatch, but no property is generated for it here.
|
||||
// "ColorScheme" is special-cased in the dispatch (it is backed by the Dark/Light
|
||||
// scheme names) and so is intentionally not listed here.
|
||||
#define APPEARANCE_INHERITABLE_SETTINGS(PROJECTED, CUSTOM) \
|
||||
CUSTOM(FontFace) \
|
||||
PROJECTED(_appearance.SourceProfile().FontInfo(), FontSize) \
|
||||
CUSTOM(LineHeight) \
|
||||
CUSTOM(CellWidth) \
|
||||
PROJECTED(_appearance.SourceProfile().FontInfo(), FontWeight) \
|
||||
#define APPEARANCE_INHERITABLE_SETTINGS(PROJECTED, CUSTOM) \
|
||||
CUSTOM(FontFace) \
|
||||
PROJECTED(_appearance.SourceProfile().FontInfo(), FontSize) \
|
||||
CUSTOM(LineHeight) \
|
||||
CUSTOM(CellWidth) \
|
||||
PROJECTED(_appearance.SourceProfile().FontInfo(), FontWeight) \
|
||||
PROJECTED(_appearance.SourceProfile().FontInfo(), EnableBuiltinGlyphs) \
|
||||
PROJECTED(_appearance.SourceProfile().FontInfo(), EnableColorGlyphs) \
|
||||
CUSTOM(FontAxes) \
|
||||
CUSTOM(FontFeatures) \
|
||||
PROJECTED(_appearance, RetroTerminalEffect) \
|
||||
PROJECTED(_appearance, CursorShape) \
|
||||
PROJECTED(_appearance, CursorHeight) \
|
||||
PROJECTED(_appearance, DarkColorSchemeName) \
|
||||
PROJECTED(_appearance, LightColorSchemeName) \
|
||||
PROJECTED(_appearance, BackgroundImagePath) \
|
||||
PROJECTED(_appearance, BackgroundImageOpacity) \
|
||||
PROJECTED(_appearance, BackgroundImageStretchMode) \
|
||||
PROJECTED(_appearance, BackgroundImageAlignment) \
|
||||
PROJECTED(_appearance, IntenseTextStyle) \
|
||||
PROJECTED(_appearance, AdjustIndistinguishableColors) \
|
||||
PROJECTED(_appearance, Foreground) \
|
||||
PROJECTED(_appearance, Background) \
|
||||
PROJECTED(_appearance, SelectionBackground) \
|
||||
CUSTOM(FontAxes) \
|
||||
CUSTOM(FontFeatures) \
|
||||
PROJECTED(_appearance, RetroTerminalEffect) \
|
||||
PROJECTED(_appearance, CursorShape) \
|
||||
PROJECTED(_appearance, CursorHeight) \
|
||||
PROJECTED(_appearance, DarkColorSchemeName) \
|
||||
PROJECTED(_appearance, LightColorSchemeName) \
|
||||
PROJECTED(_appearance, BackgroundImagePath) \
|
||||
PROJECTED(_appearance, BackgroundImageOpacity) \
|
||||
PROJECTED(_appearance, BackgroundImageStretchMode) \
|
||||
PROJECTED(_appearance, BackgroundImageAlignment) \
|
||||
PROJECTED(_appearance, IntenseTextStyle) \
|
||||
PROJECTED(_appearance, AdjustIndistinguishableColors) \
|
||||
PROJECTED(_appearance, Foreground) \
|
||||
PROJECTED(_appearance, Background) \
|
||||
PROJECTED(_appearance, SelectionBackground) \
|
||||
PROJECTED(_appearance, CursorColor)
|
||||
|
||||
#define APPEARANCE_GEN_PROJECTED(target, name) OBSERVABLE_PROJECTED_SETTING(target, name);
|
||||
|
||||
@@ -72,7 +72,12 @@
|
||||
<TextBlock x:Uid="Profile_TextHeader"
|
||||
Margin="0,0,0,4"
|
||||
Style="{StaticResource TextBlockSubHeaderStyle}" />
|
||||
<StackPanel Style="{StaticResource SettingsStackStyle}">
|
||||
<!--
|
||||
Spacing is intentionally 0 to work around WinUI 2's StackPanel.Spacing reserving space for
|
||||
hidden items. Instead apply a margin to each item.
|
||||
-->
|
||||
<StackPanel Spacing="0"
|
||||
Style="{StaticResource SettingsStackStyle}">
|
||||
<!-- Color Scheme -->
|
||||
<!-- This currently only display the Dark color scheme, even if the user has a pair of schemes set. -->
|
||||
<local:SettingsExpander x:Name="ColorScheme"
|
||||
@@ -81,129 +86,129 @@
|
||||
<local:SettingsExpander.Content>
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<ComboBox Padding="4"
|
||||
ItemsSource="{x:Bind Appearance.SchemesList, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind Appearance.CurrentColorScheme, Mode=TwoWay}"
|
||||
Style="{StaticResource ComboBoxSettingStyle}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="local:ColorSchemeViewModel">
|
||||
<Grid Grid.Column="0"
|
||||
Padding="8"
|
||||
VerticalAlignment="Center"
|
||||
Background="{x:Bind mtu:Converters.ColorToBrush(BackgroundColor.Color), Mode=OneWay}"
|
||||
ColumnSpacing="1"
|
||||
CornerRadius="2"
|
||||
RowSpacing="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Content="{x:Bind ColorEntryAt(0), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Content="{x:Bind ColorEntryAt(1), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Content="{x:Bind ColorEntryAt(2), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="3"
|
||||
Content="{x:Bind ColorEntryAt(3), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="4"
|
||||
Content="{x:Bind ColorEntryAt(4), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="5"
|
||||
Content="{x:Bind ColorEntryAt(5), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="6"
|
||||
Content="{x:Bind ColorEntryAt(6), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="7"
|
||||
Content="{x:Bind ColorEntryAt(7), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Content="{x:Bind ColorEntryAt(8), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Content="{x:Bind ColorEntryAt(9), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Content="{x:Bind ColorEntryAt(10), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="3"
|
||||
Content="{x:Bind ColorEntryAt(11), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="4"
|
||||
Content="{x:Bind ColorEntryAt(12), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="5"
|
||||
Content="{x:Bind ColorEntryAt(13), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="6"
|
||||
Content="{x:Bind ColorEntryAt(14), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="7"
|
||||
Content="{x:Bind ColorEntryAt(15), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<TextBlock Grid.RowSpan="2"
|
||||
Grid.Column="8"
|
||||
MaxWidth="192"
|
||||
Margin="4,0,4,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
FontFamily="Cascadia Code"
|
||||
Foreground="{x:Bind mtu:Converters.ColorToBrush(ForegroundColor.Color), Mode=OneWay}"
|
||||
Text="{x:Bind Name, Mode=OneWay}"
|
||||
TextTrimming="WordEllipsis"
|
||||
ToolTipService.ToolTip="{x:Bind Name, Mode=OneWay}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
ItemsSource="{x:Bind Appearance.SchemesList, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind Appearance.CurrentColorScheme, Mode=TwoWay}"
|
||||
Style="{StaticResource ComboBoxSettingStyle}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="local:ColorSchemeViewModel">
|
||||
<Grid Grid.Column="0"
|
||||
Padding="8"
|
||||
VerticalAlignment="Center"
|
||||
Background="{x:Bind mtu:Converters.ColorToBrush(BackgroundColor.Color), Mode=OneWay}"
|
||||
ColumnSpacing="1"
|
||||
CornerRadius="2"
|
||||
RowSpacing="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Content="{x:Bind ColorEntryAt(0), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Content="{x:Bind ColorEntryAt(1), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Content="{x:Bind ColorEntryAt(2), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="3"
|
||||
Content="{x:Bind ColorEntryAt(3), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="4"
|
||||
Content="{x:Bind ColorEntryAt(4), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="5"
|
||||
Content="{x:Bind ColorEntryAt(5), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="6"
|
||||
Content="{x:Bind ColorEntryAt(6), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="0"
|
||||
Grid.Column="7"
|
||||
Content="{x:Bind ColorEntryAt(7), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Content="{x:Bind ColorEntryAt(8), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Content="{x:Bind ColorEntryAt(9), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Content="{x:Bind ColorEntryAt(10), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="3"
|
||||
Content="{x:Bind ColorEntryAt(11), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="4"
|
||||
Content="{x:Bind ColorEntryAt(12), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="5"
|
||||
Content="{x:Bind ColorEntryAt(13), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="6"
|
||||
Content="{x:Bind ColorEntryAt(14), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<ContentControl Grid.Row="1"
|
||||
Grid.Column="7"
|
||||
Content="{x:Bind ColorEntryAt(15), Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource ColorChipTemplate}"
|
||||
IsTabStop="False" />
|
||||
<TextBlock Grid.RowSpan="2"
|
||||
Grid.Column="8"
|
||||
MaxWidth="192"
|
||||
Margin="4,0,4,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
FontFamily="Cascadia Code"
|
||||
Foreground="{x:Bind mtu:Converters.ColorToBrush(ForegroundColor.Color), Mode=OneWay}"
|
||||
Text="{x:Bind Name, Mode=OneWay}"
|
||||
TextTrimming="WordEllipsis"
|
||||
ToolTipService.ToolTip="{x:Bind Name, Mode=OneWay}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<local:SettingResetButton SettingName="ColorScheme"
|
||||
Target="{x:Bind Appearance}" />
|
||||
</StackPanel>
|
||||
@@ -284,159 +289,163 @@
|
||||
</ContentPresenter>
|
||||
</local:SettingsExpander.ItemsHeader>
|
||||
</local:SettingsExpander>
|
||||
<!-- Font Face -->
|
||||
<!--
|
||||
Grouped with its diagnostic cards so collapsed warnings don't add phantom spacing.
|
||||
Manually adding Margin to work around WinUI 2 adding spacing for hidden elements.
|
||||
The cards below only apply to the default appearance.
|
||||
Group them in a single visibility-gated group to avoid phantom spacing when collapsed.
|
||||
-->
|
||||
<StackPanel>
|
||||
<local:SettingsCard x:Name="FontFaceContainer"
|
||||
x:Uid="Profile_FontFace"
|
||||
Visibility="{x:Bind Appearance.IsDefault, Mode=OneWay}">
|
||||
|
||||
<StackPanel Margin="0,8,0,0">
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<AutoSuggestBox x:Uid="Profile_FontFaceBox"
|
||||
GotFocus="FontFaceBox_GotFocus"
|
||||
ItemTemplate="{StaticResource FontFaceComboBoxItemTemplate}"
|
||||
ItemsSource="{x:Bind FilteredFontList, Mode=OneWay}"
|
||||
LostFocus="FontFaceBox_LostFocus"
|
||||
QuerySubmitted="FontFaceBox_QuerySubmitted"
|
||||
Text="{x:Bind Appearance.FontFace, Mode=OneWay}"
|
||||
TextBoxStyle="{StaticResource TextBoxSettingStyle}"
|
||||
TextChanged="FontFaceBox_TextChanged"
|
||||
UpdateTextOnSelect="False" />
|
||||
<local:SettingResetButton SettingName="FontFace"
|
||||
Target="{x:Bind Appearance}" />
|
||||
</StackPanel>
|
||||
<CheckBox x:Name="ShowAllFontsCheckbox"
|
||||
x:Uid="Profile_FontFaceShowAllFonts"
|
||||
IsChecked="{x:Bind ShowAllFonts, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
</local:SettingsCard>
|
||||
<local:SettingsCard x:Name="MissingFontFaces"
|
||||
x:Uid="Profile_MissingFontFaces"
|
||||
Margin="0,6,0,0"
|
||||
Background="{ThemeResource SettingContainerErrorSeverityBackgroundBrush}"
|
||||
Description="{x:Bind Appearance.MissingFontFaces, Mode=OneWay}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(Appearance.MissingFontFaces), Mode=OneWay}">
|
||||
<local:SettingsCard.HeaderIcon>
|
||||
<FontIcon FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||
FontSize="{StaticResource SettingContainerIconFontSize}"
|
||||
Foreground="{ThemeResource SettingContainerErrorSeverityIconBackground}"
|
||||
Glyph="{StaticResource SettingContainerErrorIconGlyph}" />
|
||||
</local:SettingsCard.HeaderIcon>
|
||||
</local:SettingsCard>
|
||||
<local:SettingsCard x:Name="ProportionalFontFaces"
|
||||
x:Uid="Profile_ProportionalFontFaces"
|
||||
Margin="0,6,0,0"
|
||||
Background="{ThemeResource SettingContainerWarningSeverityBackgroundBrush}"
|
||||
Description="{x:Bind Appearance.ProportionalFontFaces, Mode=OneWay}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(Appearance.ProportionalFontFaces), Mode=OneWay}">
|
||||
<local:SettingsCard.HeaderIcon>
|
||||
<FontIcon FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||
FontSize="{StaticResource SettingContainerIconFontSize}"
|
||||
Foreground="{ThemeResource SettingContainerWarningSeverityIconBackground}"
|
||||
Glyph="{StaticResource SettingContainerWarningIconGlyph}" />
|
||||
</local:SettingsCard.HeaderIcon>
|
||||
</local:SettingsCard>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Font Size -->
|
||||
<local:SettingsCard x:Name="FontSize"
|
||||
x:Uid="Profile_FontSize"
|
||||
Visibility="{x:Bind Appearance.IsDefault, Mode=OneWay}">
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<muxc:NumberBox x:Name="_fontSizeBox"
|
||||
x:Uid="Profile_FontSizeBox"
|
||||
LargeChange="10"
|
||||
Maximum="128"
|
||||
Minimum="1"
|
||||
SmallChange="1"
|
||||
Style="{StaticResource NumberBoxSettingStyle}"
|
||||
Value="{x:Bind Appearance.FontSize, Mode=TwoWay}" />
|
||||
<local:SettingResetButton SettingName="FontSize"
|
||||
Target="{x:Bind Appearance}" />
|
||||
</StackPanel>
|
||||
</local:SettingsCard>
|
||||
|
||||
<!-- Line Height -->
|
||||
<local:SettingsCard x:Name="LineHeight"
|
||||
x:Uid="Profile_LineHeight"
|
||||
Visibility="{x:Bind Appearance.IsDefault, Mode=OneWay}">
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<muxc:NumberBox x:Name="_lineHeightBox"
|
||||
x:Uid="Profile_LineHeightBox"
|
||||
LargeChange="0.1"
|
||||
Maximum="10"
|
||||
Minimum="0.1"
|
||||
SmallChange="0.1"
|
||||
Style="{StaticResource NumberBoxSettingStyle}"
|
||||
Value="{x:Bind Appearance.LineHeight, Mode=TwoWay}" />
|
||||
<local:SettingResetButton SettingName="LineHeight"
|
||||
Target="{x:Bind Appearance}" />
|
||||
</StackPanel>
|
||||
</local:SettingsCard>
|
||||
|
||||
<!-- Cell Width -->
|
||||
<local:SettingsCard x:Name="CellWidth"
|
||||
x:Uid="Profile_CellWidth"
|
||||
Visibility="{x:Bind Appearance.IsDefault, Mode=OneWay}">
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<muxc:NumberBox x:Name="_cellWidthBox"
|
||||
x:Uid="Profile_CellWidthBox"
|
||||
LargeChange="0.1"
|
||||
Maximum="10"
|
||||
Minimum="0.1"
|
||||
SmallChange="0.1"
|
||||
Style="{StaticResource NumberBoxSettingStyle}"
|
||||
Value="{x:Bind Appearance.CellWidth, Mode=TwoWay}" />
|
||||
<local:SettingResetButton SettingName="CellWidth"
|
||||
Target="{x:Bind Appearance}" />
|
||||
</StackPanel>
|
||||
</local:SettingsCard>
|
||||
|
||||
<!-- Font Weight -->
|
||||
<local:SettingsCard x:Name="FontWeight"
|
||||
x:Uid="Profile_FontWeight"
|
||||
Visibility="{x:Bind Appearance.IsDefault, Mode=OneWay}">
|
||||
<StackPanel Margin="0,4,0,0"
|
||||
Style="{StaticResource SettingsStackStyle}"
|
||||
Visibility="{x:Bind Appearance.IsDefault, Mode=OneWay}">
|
||||
<!-- Font Face -->
|
||||
<!--
|
||||
Grouped with its diagnostic cards so collapsed warnings don't add phantom spacing.
|
||||
Manually adding Margin to work around WinUI 2 adding spacing for hidden elements.
|
||||
-->
|
||||
<StackPanel>
|
||||
<local:SettingsCard x:Name="FontFaceContainer"
|
||||
x:Uid="Profile_FontFace">
|
||||
|
||||
<StackPanel Margin="0,8,0,0">
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<AutoSuggestBox x:Uid="Profile_FontFaceBox"
|
||||
GotFocus="FontFaceBox_GotFocus"
|
||||
ItemTemplate="{StaticResource FontFaceComboBoxItemTemplate}"
|
||||
ItemsSource="{x:Bind FilteredFontList, Mode=OneWay}"
|
||||
LostFocus="FontFaceBox_LostFocus"
|
||||
QuerySubmitted="FontFaceBox_QuerySubmitted"
|
||||
Text="{x:Bind Appearance.FontFace, Mode=OneWay}"
|
||||
TextBoxStyle="{StaticResource TextBoxSettingStyle}"
|
||||
TextChanged="FontFaceBox_TextChanged"
|
||||
UpdateTextOnSelect="False" />
|
||||
<local:SettingResetButton SettingName="FontFace"
|
||||
Target="{x:Bind Appearance}" />
|
||||
</StackPanel>
|
||||
<CheckBox x:Name="ShowAllFontsCheckbox"
|
||||
x:Uid="Profile_FontFaceShowAllFonts"
|
||||
IsChecked="{x:Bind ShowAllFonts, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
</local:SettingsCard>
|
||||
<local:SettingsCard x:Name="MissingFontFaces"
|
||||
x:Uid="Profile_MissingFontFaces"
|
||||
Margin="0,6,0,0"
|
||||
Background="{ThemeResource SettingContainerErrorSeverityBackgroundBrush}"
|
||||
Description="{x:Bind Appearance.MissingFontFaces, Mode=OneWay}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(Appearance.MissingFontFaces), Mode=OneWay}">
|
||||
<local:SettingsCard.HeaderIcon>
|
||||
<FontIcon FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||
FontSize="{StaticResource SettingContainerIconFontSize}"
|
||||
Foreground="{ThemeResource SettingContainerErrorSeverityIconBackground}"
|
||||
Glyph="{StaticResource SettingContainerErrorIconGlyph}" />
|
||||
</local:SettingsCard.HeaderIcon>
|
||||
</local:SettingsCard>
|
||||
<local:SettingsCard x:Name="ProportionalFontFaces"
|
||||
x:Uid="Profile_ProportionalFontFaces"
|
||||
Margin="0,6,0,0"
|
||||
Background="{ThemeResource SettingContainerWarningSeverityBackgroundBrush}"
|
||||
Description="{x:Bind Appearance.ProportionalFontFaces, Mode=OneWay}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(Appearance.ProportionalFontFaces), Mode=OneWay}">
|
||||
<local:SettingsCard.HeaderIcon>
|
||||
<FontIcon FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||
FontSize="{StaticResource SettingContainerIconFontSize}"
|
||||
Foreground="{ThemeResource SettingContainerWarningSeverityIconBackground}"
|
||||
Glyph="{StaticResource SettingContainerWarningIconGlyph}" />
|
||||
</local:SettingsCard.HeaderIcon>
|
||||
</local:SettingsCard>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Font Size -->
|
||||
<local:SettingsCard x:Name="FontSize"
|
||||
x:Uid="Profile_FontSize">
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<ComboBox x:Name="FontWeightComboBox"
|
||||
x:Uid="Profile_FontWeightComboBox"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind FontWeightList, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind CurrentFontWeight, Mode=TwoWay}"
|
||||
Style="{StaticResource ComboBoxSettingStyle}" />
|
||||
<local:SettingResetButton SettingName="FontWeight"
|
||||
<muxc:NumberBox x:Name="_fontSizeBox"
|
||||
x:Uid="Profile_FontSizeBox"
|
||||
LargeChange="10"
|
||||
Maximum="128"
|
||||
Minimum="1"
|
||||
SmallChange="1"
|
||||
Style="{StaticResource NumberBoxSettingStyle}"
|
||||
Value="{x:Bind Appearance.FontSize, Mode=TwoWay}" />
|
||||
<local:SettingResetButton SettingName="FontSize"
|
||||
Target="{x:Bind Appearance}" />
|
||||
</StackPanel>
|
||||
</local:SettingsCard>
|
||||
|
||||
<!-- Custom Font Weight Control -->
|
||||
<Grid Margin="0,10,0,0"
|
||||
Style="{StaticResource CustomSliderControlGridStyle}"
|
||||
Visibility="{x:Bind IsCustomFontWeight, Mode=OneWay}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Slider x:Name="FontWeightSlider"
|
||||
x:Uid="Profile_FontWeightSlider"
|
||||
Grid.Column="0"
|
||||
Maximum="1000"
|
||||
Minimum="0"
|
||||
TickFrequency="50"
|
||||
TickPlacement="Outside"
|
||||
Value="{x:Bind mtu:Converters.FontWeightToDouble(Appearance.FontWeight), BindBack=Appearance.SetFontWeightFromDouble, Mode=TwoWay}" />
|
||||
<TextBlock Grid.Column="1"
|
||||
Margin="10,0,0,0"
|
||||
Style="{StaticResource SliderValueLabelStyle}"
|
||||
Text="{Binding ElementName=FontWeightSlider, Path=Value, Mode=OneWay}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</local:SettingsCard>
|
||||
<!-- Line Height -->
|
||||
<local:SettingsCard x:Name="LineHeight"
|
||||
x:Uid="Profile_LineHeight">
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<muxc:NumberBox x:Name="_lineHeightBox"
|
||||
x:Uid="Profile_LineHeightBox"
|
||||
LargeChange="0.1"
|
||||
Maximum="10"
|
||||
Minimum="0.1"
|
||||
SmallChange="0.1"
|
||||
Style="{StaticResource NumberBoxSettingStyle}"
|
||||
Value="{x:Bind Appearance.LineHeight, Mode=TwoWay}" />
|
||||
<local:SettingResetButton SettingName="LineHeight"
|
||||
Target="{x:Bind Appearance}" />
|
||||
</StackPanel>
|
||||
</local:SettingsCard>
|
||||
|
||||
<!-- Cell Width -->
|
||||
<local:SettingsCard x:Name="CellWidth"
|
||||
x:Uid="Profile_CellWidth">
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<muxc:NumberBox x:Name="_cellWidthBox"
|
||||
x:Uid="Profile_CellWidthBox"
|
||||
LargeChange="0.1"
|
||||
Maximum="10"
|
||||
Minimum="0.1"
|
||||
SmallChange="0.1"
|
||||
Style="{StaticResource NumberBoxSettingStyle}"
|
||||
Value="{x:Bind Appearance.CellWidth, Mode=TwoWay}" />
|
||||
<local:SettingResetButton SettingName="CellWidth"
|
||||
Target="{x:Bind Appearance}" />
|
||||
</StackPanel>
|
||||
</local:SettingsCard>
|
||||
|
||||
<!-- Font Weight -->
|
||||
<local:SettingsCard x:Name="FontWeight"
|
||||
x:Uid="Profile_FontWeight">
|
||||
<StackPanel>
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<ComboBox x:Name="FontWeightComboBox"
|
||||
x:Uid="Profile_FontWeightComboBox"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind FontWeightList, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind CurrentFontWeight, Mode=TwoWay}"
|
||||
Style="{StaticResource ComboBoxSettingStyle}" />
|
||||
<local:SettingResetButton SettingName="FontWeight"
|
||||
Target="{x:Bind Appearance}" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Custom Font Weight Control -->
|
||||
<Grid Margin="0,10,0,0"
|
||||
Style="{StaticResource CustomSliderControlGridStyle}"
|
||||
Visibility="{x:Bind IsCustomFontWeight, Mode=OneWay}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Slider x:Name="FontWeightSlider"
|
||||
x:Uid="Profile_FontWeightSlider"
|
||||
Grid.Column="0"
|
||||
Maximum="1000"
|
||||
Minimum="0"
|
||||
TickFrequency="50"
|
||||
TickPlacement="Outside"
|
||||
Value="{x:Bind mtu:Converters.FontWeightToDouble(Appearance.FontWeight), BindBack=Appearance.SetFontWeightFromDouble, Mode=TwoWay}" />
|
||||
<TextBlock Grid.Column="1"
|
||||
Margin="10,0,0,0"
|
||||
Style="{StaticResource SliderValueLabelStyle}"
|
||||
Text="{Binding ElementName=FontWeightSlider, Path=Value, Mode=OneWay}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</local:SettingsCard>
|
||||
</StackPanel>
|
||||
<local:SettingsExpander x:Name="FontAxes"
|
||||
x:Uid="Profile_FontAxes">
|
||||
x:Uid="Profile_FontAxes"
|
||||
Margin="0,4,0,0">
|
||||
<local:SettingsExpander.Content>
|
||||
<local:SettingResetButton SettingName="FontAxes"
|
||||
Target="{x:Bind Appearance}" />
|
||||
@@ -468,7 +477,8 @@
|
||||
</local:SettingsExpander.ItemsHeader>
|
||||
</local:SettingsExpander>
|
||||
<local:SettingsExpander x:Name="FontFeatures"
|
||||
x:Uid="Profile_FontFeatures">
|
||||
x:Uid="Profile_FontFeatures"
|
||||
Margin="0,4,0,0">
|
||||
<local:SettingsExpander.Content>
|
||||
<local:SettingResetButton SettingName="FontFeatures"
|
||||
Target="{x:Bind Appearance}" />
|
||||
@@ -502,7 +512,8 @@
|
||||
|
||||
<!-- Builtin Glyphs -->
|
||||
<local:SettingsCard x:Name="EnableBuiltinGlyphs"
|
||||
x:Uid="Profile_EnableBuiltinGlyphs">
|
||||
x:Uid="Profile_EnableBuiltinGlyphs"
|
||||
Margin="0,4,0,0">
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<ToggleSwitch VerticalAlignment="Center"
|
||||
IsOn="{x:Bind Appearance.EnableBuiltinGlyphs, Mode=TwoWay}"
|
||||
@@ -514,7 +525,8 @@
|
||||
|
||||
<!-- Color Glyphs -->
|
||||
<local:SettingsCard x:Name="EnableColorGlyphs"
|
||||
x:Uid="Profile_EnableColorGlyphs">
|
||||
x:Uid="Profile_EnableColorGlyphs"
|
||||
Margin="0,4,0,0">
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<ToggleSwitch VerticalAlignment="Center"
|
||||
IsOn="{x:Bind Appearance.EnableColorGlyphs, Mode=TwoWay}"
|
||||
@@ -526,7 +538,8 @@
|
||||
|
||||
<!-- Retro Terminal Effect -->
|
||||
<local:SettingsCard x:Name="RetroTerminalEffect"
|
||||
x:Uid="Profile_RetroTerminalEffect">
|
||||
x:Uid="Profile_RetroTerminalEffect"
|
||||
Margin="0,4,0,0">
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<ToggleSwitch VerticalAlignment="Center"
|
||||
IsOn="{x:Bind Appearance.RetroTerminalEffect, Mode=TwoWay}"
|
||||
@@ -538,7 +551,8 @@
|
||||
|
||||
<!-- Adjust Indistinguishable Colors -->
|
||||
<local:SettingsCard x:Name="AdjustIndistinguishableColors"
|
||||
x:Uid="Profile_AdjustIndistinguishableColors">
|
||||
x:Uid="Profile_AdjustIndistinguishableColors"
|
||||
Margin="0,4,0,0">
|
||||
<StackPanel Style="{StaticResource SettingControlStackStyle}">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
|
||||
@@ -88,6 +88,8 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
return ProfileSubPage::Base;
|
||||
case BreadcrumbSubPage::Profile_Appearance:
|
||||
return ProfileSubPage::Appearance;
|
||||
case BreadcrumbSubPage::Profile_UnfocusedAppearance:
|
||||
return ProfileSubPage::UnfocusedAppearance;
|
||||
case BreadcrumbSubPage::Profile_Terminal:
|
||||
return ProfileSubPage::Terminal;
|
||||
case BreadcrumbSubPage::Profile_Advanced:
|
||||
@@ -515,6 +517,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
contentFrame().Navigate(xaml_typename<Editor::Profiles_Appearance>(), winrt::make<NavigateToPageArgs>(profile, *this, elementToFocus));
|
||||
_breadcrumbs.Append(winrt::make<Breadcrumb>(breadcrumbTag, RS_(L"Profile_Appearance/Header"), BreadcrumbSubPage::Profile_Appearance));
|
||||
}
|
||||
else if (page == ProfileSubPage::UnfocusedAppearance)
|
||||
{
|
||||
contentFrame().Navigate(xaml_typename<Editor::Profiles_UnfocusedAppearance>(), winrt::make<NavigateToPageArgs>(profile, *this, elementToFocus));
|
||||
_breadcrumbs.Append(winrt::make<Breadcrumb>(breadcrumbTag, RS_(L"Profile_UnfocusedAppearanceTextBlock/Text"), BreadcrumbSubPage::Profile_UnfocusedAppearance));
|
||||
}
|
||||
else if (page == ProfileSubPage::Terminal)
|
||||
{
|
||||
contentFrame().Navigate(xaml_typename<Editor::Profiles_Terminal>(), winrt::make<NavigateToPageArgs>(profile, *this, elementToFocus));
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
{
|
||||
None = 0,
|
||||
Profile_Appearance,
|
||||
Profile_UnfocusedAppearance,
|
||||
Profile_Terminal,
|
||||
Profile_Advanced,
|
||||
ColorSchemes_Edit,
|
||||
|
||||
@@ -159,6 +159,10 @@
|
||||
<DependentUpon>Profiles_Appearance.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Profiles_UnfocusedAppearance.h">
|
||||
<DependentUpon>Profiles_UnfocusedAppearance.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Profiles_Terminal.h">
|
||||
<DependentUpon>Profiles_Terminal.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
@@ -249,6 +253,9 @@
|
||||
<Page Include="Profiles_Appearance.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Profiles_UnfocusedAppearance.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Profiles_Terminal.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
@@ -383,6 +390,10 @@
|
||||
<DependentUpon>Profiles_Appearance.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Profiles_UnfocusedAppearance.cpp">
|
||||
<DependentUpon>Profiles_UnfocusedAppearance.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Profiles_Terminal.cpp">
|
||||
<DependentUpon>Profiles_Terminal.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
@@ -502,6 +513,10 @@
|
||||
<DependentUpon>Profiles_Appearance.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Midl>
|
||||
<Midl Include="Profiles_UnfocusedAppearance.idl">
|
||||
<DependentUpon>Profiles_UnfocusedAppearance.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Midl>
|
||||
<Midl Include="Profiles_Terminal.idl">
|
||||
<DependentUpon>Profiles_Terminal.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
<Page Include="Profiles_Base.xaml" />
|
||||
<Page Include="Profiles_Advanced.xaml" />
|
||||
<Page Include="Profiles_Appearance.xaml" />
|
||||
<Page Include="Profiles_UnfocusedAppearance.xaml" />
|
||||
<Page Include="Appearances.xaml" />
|
||||
<Page Include="Rendering.xaml" />
|
||||
<Page Include="Actions.xaml" />
|
||||
|
||||
@@ -193,6 +193,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
return _parsedPadding.Bottom;
|
||||
}
|
||||
|
||||
Control::IControlSettings ProfileViewModel::TermSettings() const
|
||||
{
|
||||
// This may look pricey, but it only resolves resources that have not been visited
|
||||
@@ -201,6 +202,14 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
return *Settings::TerminalSettings::CreateForPreview(_appSettings, _profile);
|
||||
}
|
||||
|
||||
Control::IControlSettings ProfileViewModel::TermSettingsUnfocused() const
|
||||
{
|
||||
// This may look pricey, but it only resolves resources that have not been visited
|
||||
// and the preview update is debounced.
|
||||
_appSettings.ResolveMediaResources();
|
||||
return *Settings::TerminalSettings::CreateForPreviewUnfocused(_appSettings, _profile);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Updates the lists of fonts and sorts them alphabetically
|
||||
void ProfileViewModel::UpdateFontList() noexcept
|
||||
@@ -361,9 +370,9 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
Windows::Foundation::IInspectable ProfileViewModel::SettingOverrideSource(const hstring& name)
|
||||
{
|
||||
const std::wstring_view n{ name };
|
||||
#define HANDLE(Setting) \
|
||||
if (n == L## #Setting) \
|
||||
{ \
|
||||
#define HANDLE(Setting) \
|
||||
if (n == L## #Setting) \
|
||||
{ \
|
||||
return Setting##OverrideSource(); \
|
||||
}
|
||||
#define HANDLE_PROJECTED(target, Setting) HANDLE(Setting)
|
||||
@@ -481,6 +490,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
return EditableUnfocusedAppearance() && HasUnfocusedAppearance();
|
||||
}
|
||||
|
||||
hstring ProfileViewModel::UnfocusedAppearanceCardValue()
|
||||
{
|
||||
return HasUnfocusedAppearance() ? hstring{} : RS_(L"Profile_UnfocusedAppearanceNone");
|
||||
}
|
||||
|
||||
void ProfileViewModel::CreateUnfocusedAppearance()
|
||||
{
|
||||
_profile.CreateUnfocusedAppearance();
|
||||
@@ -488,7 +502,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
_unfocusedAppearanceViewModel = winrt::make<implementation::AppearanceViewModel>(_profile.UnfocusedAppearance().try_as<AppearanceConfig>());
|
||||
_unfocusedAppearanceViewModel.SchemesList(DefaultAppearance().SchemesList());
|
||||
|
||||
_NotifyChanges(L"UnfocusedAppearance", L"HasUnfocusedAppearance", L"ShowUnfocusedAppearance");
|
||||
_NotifyChanges(L"UnfocusedAppearance", L"HasUnfocusedAppearance", L"ShowUnfocusedAppearance", L"UnfocusedAppearanceCardValue");
|
||||
}
|
||||
|
||||
void ProfileViewModel::DeleteUnfocusedAppearance()
|
||||
@@ -497,7 +511,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
_unfocusedAppearanceViewModel = nullptr;
|
||||
|
||||
_NotifyChanges(L"UnfocusedAppearance", L"HasUnfocusedAppearance", L"ShowUnfocusedAppearance");
|
||||
_NotifyChanges(L"UnfocusedAppearance", L"HasUnfocusedAppearance", L"ShowUnfocusedAppearance", L"UnfocusedAppearanceCardValue");
|
||||
}
|
||||
|
||||
Editor::AppearanceViewModel ProfileViewModel::UnfocusedAppearance() const
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
ProfileViewModel(const Model::Profile& profile, const Model::CascadiaSettings& settings, const Windows::UI::Core::CoreDispatcher& dispatcher);
|
||||
Control::IControlSettings TermSettings() const;
|
||||
Control::IControlSettings TermSettingsUnfocused() const;
|
||||
void DeleteProfile();
|
||||
|
||||
void SetupAppearances(Windows::Foundation::Collections::IObservableVector<Editor::ColorSchemeViewModel> schemesList);
|
||||
@@ -93,6 +94,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
bool HasUnfocusedAppearance();
|
||||
bool EditableUnfocusedAppearance() const noexcept;
|
||||
bool ShowUnfocusedAppearance();
|
||||
hstring UnfocusedAppearanceCardValue();
|
||||
void CreateUnfocusedAppearance();
|
||||
void DeleteUnfocusedAppearance();
|
||||
|
||||
@@ -121,7 +123,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
// Settings that expose a reset button.
|
||||
// Wired into both the property accessors and the reset dispatch automatically.
|
||||
#define PROFILE_INHERITABLE_SETTINGS(X) \
|
||||
#define PROFILE_INHERITABLE_SETTINGS(X) \
|
||||
X(_profile, Name) \
|
||||
X(_profile, Hidden) \
|
||||
X(_profile, Icon) \
|
||||
|
||||
@@ -33,7 +33,8 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
Base = 0,
|
||||
Appearance = 1,
|
||||
Terminal = 2,
|
||||
Advanced = 3
|
||||
Advanced = 3,
|
||||
UnfocusedAppearance = 4
|
||||
};
|
||||
|
||||
runtimeclass ProfileViewModel : Windows.UI.Xaml.Data.INotifyPropertyChanged, IInheritableViewModel
|
||||
@@ -85,6 +86,7 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
Boolean HasUnfocusedAppearance { get; };
|
||||
Boolean EditableUnfocusedAppearance { get; };
|
||||
Boolean ShowUnfocusedAppearance { get; };
|
||||
String UnfocusedAppearanceCardValue { get; };
|
||||
AppearanceViewModel UnfocusedAppearance { get; };
|
||||
|
||||
Boolean ShowMarksAvailable { get; };
|
||||
|
||||
@@ -82,26 +82,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
_AppearanceViewModelChangedRevoker.revoke();
|
||||
}
|
||||
|
||||
void Profiles_Appearance::CreateUnfocusedAppearance_Click(const IInspectable& /*sender*/, const RoutedEventArgs& /*e*/)
|
||||
{
|
||||
TraceLoggingWrite(
|
||||
g_hTerminalSettingsEditorProvider,
|
||||
"CreateUnfocusedAppearance",
|
||||
TraceLoggingDescription("Event emitted when the user creates an unfocused appearance for a profile"),
|
||||
TraceLoggingValue(_Profile.IsBaseLayer(), "IsProfileDefaults", "If the modified profile is the profile.defaults object"),
|
||||
TraceLoggingValue(static_cast<GUID>(_Profile.Guid()), "ProfileGuid", "The guid of the profile that was navigated to"),
|
||||
TraceLoggingValue(_Profile.Source().c_str(), "ProfileSource", "The source of the profile that was navigated to"),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
|
||||
|
||||
_Profile.CreateUnfocusedAppearance();
|
||||
}
|
||||
|
||||
void Profiles_Appearance::DeleteUnfocusedAppearance_Click(const IInspectable& /*sender*/, const RoutedEventArgs& /*e*/)
|
||||
{
|
||||
_Profile.DeleteUnfocusedAppearance();
|
||||
}
|
||||
|
||||
void Profiles_Appearance::_onProfilePropertyChanged(const IInspectable&, const PropertyChangedEventArgs&)
|
||||
{
|
||||
if (!_updatePreviewControl)
|
||||
|
||||
@@ -19,9 +19,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
void OnNavigatedTo(const Windows::UI::Xaml::Navigation::NavigationEventArgs& e);
|
||||
void OnNavigatedFrom(const Windows::UI::Xaml::Navigation::NavigationEventArgs& e);
|
||||
|
||||
void CreateUnfocusedAppearance_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
|
||||
void DeleteUnfocusedAppearance_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
|
||||
|
||||
Editor::IHostedInWindow WindowRoot() const noexcept { return _weakWindowRoot.get(); };
|
||||
|
||||
til::property_changed_event PropertyChanged;
|
||||
|
||||
@@ -216,59 +216,6 @@
|
||||
</StackPanel>
|
||||
</local:SettingsCard>
|
||||
</StackPanel>
|
||||
<StackPanel MaxWidth="{StaticResource StandardControlMaxWidth}">
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Visibility="{x:Bind Profile.EditableUnfocusedAppearance, Mode=OneWay}">
|
||||
<TextBlock x:Uid="Profile_UnfocusedAppearanceTextBlock"
|
||||
Style="{StaticResource TextBlockSubtitleStyle}" />
|
||||
|
||||
<!-- Create Unfocused Appearance -->
|
||||
<Button x:Name="CreateUnfocusedAppearance"
|
||||
x:Uid="Profile_CreateUnfocusedAppearanceButton"
|
||||
Margin="8,0,0,0"
|
||||
VerticalAlignment="Bottom"
|
||||
Click="CreateUnfocusedAppearance_Click"
|
||||
Style="{StaticResource BaseButtonStyle}"
|
||||
Visibility="{x:Bind mtu:Converters.InvertedBooleanToVisibility(Profile.HasUnfocusedAppearance), Mode=OneWay}">
|
||||
<Button.Content>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<FontIcon Margin="0,4,0,0"
|
||||
FontSize="{StaticResource StandardIconSize}"
|
||||
Glyph="" />
|
||||
<TextBlock x:Uid="Profile_AddAppearanceButton"
|
||||
Margin="8,0,0,0"
|
||||
FontSize="{StaticResource StandardIconSize}" />
|
||||
</StackPanel>
|
||||
</Button.Content>
|
||||
</Button>
|
||||
|
||||
<!-- Delete Unfocused Appearance -->
|
||||
<Button x:Name="DeleteUnfocusedAppearance"
|
||||
x:Uid="Profile_DeleteUnfocusedAppearanceButton"
|
||||
Margin="8,0,0,0"
|
||||
VerticalAlignment="Bottom"
|
||||
Click="DeleteUnfocusedAppearance_Click"
|
||||
Style="{StaticResource DeleteButtonStyle}"
|
||||
Visibility="{x:Bind Profile.HasUnfocusedAppearance, Mode=OneWay}">
|
||||
<Button.Content>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<FontIcon FontSize="{StaticResource StandardIconSize}"
|
||||
Glyph="" />
|
||||
<TextBlock x:Uid="Profile_DeleteAppearanceButton"
|
||||
Margin="8,0,0,0"
|
||||
FontSize="{StaticResource StandardIconSize}" />
|
||||
</StackPanel>
|
||||
</Button.Content>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Unfocused Appearance -->
|
||||
<local:Appearances x:Name="UnfocusedAppearanceView"
|
||||
Appearance="{x:Bind Profile.UnfocusedAppearance, Mode=OneWay}"
|
||||
SourceProfile="{x:Bind Profile, Mode=OneWay}"
|
||||
Visibility="{x:Bind Profile.ShowUnfocusedAppearance, Mode=OneWay}"
|
||||
WindowRoot="{x:Bind WindowRoot, Mode=OneTime}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -23,6 +23,8 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
AppearanceNavigator().Header(box_value(RS_(L"Profile_Appearance/Header")));
|
||||
AppearanceNavigator().Description(box_value(RS_(L"Profile_AppearanceNavigator/Description")));
|
||||
UnfocusedAppearanceNavigator().Header(box_value(RS_(L"Profile_UnfocusedAppearanceTextBlock/Text")));
|
||||
UnfocusedAppearanceNavigator().Description(box_value(RS_(L"Profile_UnfocusedAppearanceNavigator/Description")));
|
||||
TerminalNavigator().Header(box_value(RS_(L"Profile_Terminal/Header")));
|
||||
TerminalNavigator().Description(box_value(RS_(L"Profile_TerminalNavigator/Description")));
|
||||
AdvancedNavigator().Header(box_value(RS_(L"Profile_Advanced/Header")));
|
||||
@@ -79,6 +81,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
_Profile.CurrentPage(ProfileSubPage::Appearance);
|
||||
}
|
||||
|
||||
void Profiles_Base::UnfocusedAppearance_Click(const IInspectable& /*sender*/, const RoutedEventArgs& /*args*/)
|
||||
{
|
||||
_Profile.CurrentPage(ProfileSubPage::UnfocusedAppearance);
|
||||
}
|
||||
|
||||
void Profiles_Base::Terminal_Click(const IInspectable& /*sender*/, const RoutedEventArgs& /*args*/)
|
||||
{
|
||||
_Profile.CurrentPage(ProfileSubPage::Terminal);
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
safe_void_coroutine StartingDirectory_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
|
||||
safe_void_coroutine Commandline_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
|
||||
void Appearance_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
|
||||
void UnfocusedAppearance_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
|
||||
void Terminal_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
|
||||
void Advanced_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
|
||||
void DeleteConfirmation_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
|
||||
|
||||
@@ -228,6 +228,17 @@
|
||||
<FontIcon Glyph="" />
|
||||
</local:SettingsCard.HeaderIcon>
|
||||
</local:SettingsCard>
|
||||
<local:SettingsCard x:Name="UnfocusedAppearanceNavigator"
|
||||
Click="UnfocusedAppearance_Click"
|
||||
IsClickEnabled="True"
|
||||
Visibility="{x:Bind Profile.EditableUnfocusedAppearance, Mode=OneWay}">
|
||||
<local:SettingsCard.HeaderIcon>
|
||||
<FontIcon Glyph="" />
|
||||
</local:SettingsCard.HeaderIcon>
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
Style="{StaticResource SettingContainerCurrentValueTextBlockStyle}"
|
||||
Text="{x:Bind Profile.UnfocusedAppearanceCardValue, Mode=OneWay}" />
|
||||
</local:SettingsCard>
|
||||
<local:SettingsCard x:Name="TerminalNavigator"
|
||||
Click="Terminal_Click"
|
||||
IsClickEnabled="True">
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "pch.h"
|
||||
#include "Profiles_UnfocusedAppearance.h"
|
||||
#include "Appearances.h"
|
||||
|
||||
#include "ProfileViewModel.h"
|
||||
#include "PreviewConnection.h"
|
||||
|
||||
#include "Profiles_UnfocusedAppearance.g.cpp"
|
||||
|
||||
using namespace winrt::Windows::UI::Xaml;
|
||||
using namespace winrt::Windows::UI::Xaml::Navigation;
|
||||
|
||||
static constexpr std::wstring_view AppearanceSettingPrefix{ L"App." };
|
||||
|
||||
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
Profiles_UnfocusedAppearance::Profiles_UnfocusedAppearance()
|
||||
{
|
||||
InitializeComponent();
|
||||
_previewConnection = winrt::make_self<PreviewConnection>();
|
||||
}
|
||||
|
||||
void Profiles_UnfocusedAppearance::OnNavigatedTo(const NavigationEventArgs& e)
|
||||
{
|
||||
const auto args = e.Parameter().as<Editor::NavigateToPageArgs>();
|
||||
_Profile = args.ViewModel().as<Editor::ProfileViewModel>();
|
||||
_weakWindowRoot = args.WindowRoot();
|
||||
|
||||
// Auto-create the unfocused appearance on navigate so the preview and editor are ready to go.
|
||||
if (!_Profile.HasUnfocusedAppearance())
|
||||
{
|
||||
TraceLoggingWrite(
|
||||
g_hTerminalSettingsEditorProvider,
|
||||
"CreateUnfocusedAppearance",
|
||||
TraceLoggingDescription("Event emitted when the user creates an unfocused appearance for a profile"),
|
||||
TraceLoggingValue(_Profile.IsBaseLayer(), "IsProfileDefaults", "If the modified profile is the profile.defaults object"),
|
||||
TraceLoggingValue(static_cast<GUID>(_Profile.Guid()), "ProfileGuid", "The guid of the profile that was navigated to"),
|
||||
TraceLoggingValue(_Profile.Source().c_str(), "ProfileSource", "The source of the profile that was navigated to"),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
|
||||
|
||||
_Profile.CreateUnfocusedAppearance();
|
||||
}
|
||||
|
||||
// Settings are stored in Profiles_UnfocusedAppearance and Appearances.
|
||||
// We use the "App." prefix to indicate if it's in Appearances,
|
||||
// and remove it on the way to Appearances object.
|
||||
const auto elementToFocus = args.ElementToFocus();
|
||||
if (elementToFocus.starts_with(AppearanceSettingPrefix))
|
||||
{
|
||||
std::wstring correctedName{ elementToFocus.c_str() };
|
||||
get_self<implementation::Appearances>(UnfocusedAppearanceView())->BringIntoViewWhenLoaded(hstring{ correctedName.substr(AppearanceSettingPrefix.size()) });
|
||||
}
|
||||
else
|
||||
{
|
||||
BringIntoViewWhenLoaded(elementToFocus);
|
||||
}
|
||||
|
||||
if (!_previewControl)
|
||||
{
|
||||
const auto settings = winrt::get_self<implementation::ProfileViewModel>(_Profile)->TermSettingsUnfocused();
|
||||
_previewConnection->DisplayPowerlineGlyphs(_Profile.UnfocusedAppearance().HasPowerlineCharacters());
|
||||
_previewControl = Control::TermControl(settings, settings, *_previewConnection);
|
||||
_previewControl.CursorVisibility(Control::CursorDisplayState::Shown);
|
||||
_previewControl.IsEnabled(false);
|
||||
_previewControl.AllowFocusWhenDisabled(false);
|
||||
ControlPreview().Child(_previewControl);
|
||||
}
|
||||
|
||||
// Subscribe to some changes in the view model
|
||||
// These changes should force us to update our own set of "Current<Setting>" members,
|
||||
// and propagate those changes to the UI
|
||||
_ViewModelChangedRevoker = _Profile.PropertyChanged(winrt::auto_revoke, { this, &Profiles_UnfocusedAppearance::_onProfilePropertyChanged });
|
||||
// The Appearances object handles updating the values in the settings UI, but
|
||||
// we still need to listen to the changes here just to update the preview control
|
||||
_AppearanceViewModelChangedRevoker = _Profile.UnfocusedAppearance().PropertyChanged(winrt::auto_revoke, { this, &Profiles_UnfocusedAppearance::_onProfilePropertyChanged });
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hTerminalSettingsEditorProvider,
|
||||
"NavigatedToPage",
|
||||
TraceLoggingDescription("Event emitted when the user navigates to a page in the settings UI"),
|
||||
TraceLoggingValue("profile.unfocusedAppearance", "PageId", "The identifier of the page that was navigated to"),
|
||||
TraceLoggingValue(_Profile.IsBaseLayer(), "IsProfileDefaults", "If the modified profile is the profile.defaults object"),
|
||||
TraceLoggingValue(static_cast<GUID>(_Profile.Guid()), "ProfileGuid", "The guid of the profile that was navigated to"),
|
||||
TraceLoggingValue(_Profile.Source().c_str(), "ProfileSource", "The source of the profile that was navigated to"),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
|
||||
}
|
||||
|
||||
void Profiles_UnfocusedAppearance::OnNavigatedFrom(const NavigationEventArgs& /*e*/)
|
||||
{
|
||||
_ViewModelChangedRevoker.revoke();
|
||||
_AppearanceViewModelChangedRevoker.revoke();
|
||||
}
|
||||
|
||||
void Profiles_UnfocusedAppearance::DeleteUnfocusedAppearance_Click(const IInspectable& /*sender*/, const RoutedEventArgs& /*e*/)
|
||||
{
|
||||
// Stop listening to the unfocused appearance before it goes away.
|
||||
_AppearanceViewModelChangedRevoker.revoke();
|
||||
_Profile.DeleteUnfocusedAppearance();
|
||||
|
||||
// Return to the base profile page now that there's no unfocused appearance to edit.
|
||||
_Profile.CurrentPage(ProfileSubPage::Base);
|
||||
}
|
||||
|
||||
void Profiles_UnfocusedAppearance::_onProfilePropertyChanged(const IInspectable&, const PropertyChangedEventArgs&)
|
||||
{
|
||||
if (!_updatePreviewControl)
|
||||
{
|
||||
_updatePreviewControl = std::make_shared<ThrottledFunc<>>(
|
||||
winrt::Windows::System::DispatcherQueue::GetForCurrentThread(),
|
||||
til::throttled_func_options{
|
||||
.delay = std::chrono::milliseconds{ 100 },
|
||||
.debounce = true,
|
||||
.trailing = true,
|
||||
},
|
||||
[this]() {
|
||||
if (!_Profile.HasUnfocusedAppearance())
|
||||
{
|
||||
return;
|
||||
}
|
||||
const auto settings = winrt::get_self<implementation::ProfileViewModel>(_Profile)->TermSettingsUnfocused();
|
||||
_previewConnection->DisplayPowerlineGlyphs(_Profile.UnfocusedAppearance().HasPowerlineCharacters());
|
||||
_previewControl.UpdateControlSettings(settings, settings);
|
||||
});
|
||||
}
|
||||
|
||||
_updatePreviewControl->Run();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ThrottledFunc.h>
|
||||
|
||||
#include "Profiles_UnfocusedAppearance.g.h"
|
||||
#include "PreviewConnection.h"
|
||||
#include "Utils.h"
|
||||
|
||||
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
struct Profiles_UnfocusedAppearance : public HasScrollViewer<Profiles_UnfocusedAppearance>, Profiles_UnfocusedAppearanceT<Profiles_UnfocusedAppearance>
|
||||
{
|
||||
public:
|
||||
Profiles_UnfocusedAppearance();
|
||||
|
||||
void OnNavigatedTo(const Windows::UI::Xaml::Navigation::NavigationEventArgs& e);
|
||||
void OnNavigatedFrom(const Windows::UI::Xaml::Navigation::NavigationEventArgs& e);
|
||||
|
||||
void DeleteUnfocusedAppearance_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& e);
|
||||
|
||||
Editor::IHostedInWindow WindowRoot() const noexcept { return _weakWindowRoot.get(); };
|
||||
|
||||
til::property_changed_event PropertyChanged;
|
||||
WINRT_PROPERTY(Editor::ProfileViewModel, Profile, nullptr);
|
||||
|
||||
private:
|
||||
void _onProfilePropertyChanged(const IInspectable&, const PropertyChangedEventArgs&);
|
||||
|
||||
winrt::com_ptr<PreviewConnection> _previewConnection{ nullptr };
|
||||
Microsoft::Terminal::Control::TermControl _previewControl{ nullptr };
|
||||
std::shared_ptr<ThrottledFunc<>> _updatePreviewControl;
|
||||
Windows::UI::Xaml::Data::INotifyPropertyChanged::PropertyChanged_revoker _ViewModelChangedRevoker;
|
||||
Windows::UI::Xaml::Data::INotifyPropertyChanged::PropertyChanged_revoker _AppearanceViewModelChangedRevoker;
|
||||
winrt::weak_ref<Editor::IHostedInWindow> _weakWindowRoot;
|
||||
};
|
||||
};
|
||||
|
||||
namespace winrt::Microsoft::Terminal::Settings::Editor::factory_implementation
|
||||
{
|
||||
BASIC_FACTORY(Profiles_UnfocusedAppearance);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
import "ProfileViewModel.idl";
|
||||
|
||||
namespace Microsoft.Terminal.Settings.Editor
|
||||
{
|
||||
[default_interface] runtimeclass Profiles_UnfocusedAppearance : Windows.UI.Xaml.Controls.Page, Windows.UI.Xaml.Data.INotifyPropertyChanged
|
||||
{
|
||||
Profiles_UnfocusedAppearance();
|
||||
ProfileViewModel Profile { get; };
|
||||
IHostedInWindow WindowRoot { get; };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<!--
|
||||
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
|
||||
the MIT License. See LICENSE in the project root for license information.
|
||||
-->
|
||||
<Page x:Class="Microsoft.Terminal.Settings.Editor.Profiles_UnfocusedAppearance"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="using:Microsoft.Terminal.Settings.Editor"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:model="using:Microsoft.Terminal.Settings.Model"
|
||||
xmlns:mtu="using:Microsoft.Terminal.UI"
|
||||
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Page.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="CommonResources.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Page.Resources>
|
||||
|
||||
<Grid MaxWidth="{StaticResource StandardControlMaxWidth}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock x:Uid="Profile_BaseLayerDisclaimer"
|
||||
Grid.Row="0"
|
||||
Style="{StaticResource DisclaimerStyle}"
|
||||
Visibility="{x:Bind Profile.IsBaseLayer}" />
|
||||
<StackPanel Grid.Row="1"
|
||||
Margin="0,12,0,0"
|
||||
Style="{StaticResource SettingsStackStyle}">
|
||||
<!-- Control Preview -->
|
||||
<Border MaxWidth="{StaticResource StandardControlMaxWidth}"
|
||||
Margin="0,0,0,32"
|
||||
CornerRadius="{StaticResource ControlCornerRadius}">
|
||||
<Border x:Name="ControlPreview"
|
||||
Width="400"
|
||||
Height="180"
|
||||
HorizontalAlignment="Left"
|
||||
BorderBrush="{ThemeResource ControlStrongStrokeColorDefaultBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="{StaticResource ControlCornerRadius}" />
|
||||
</Border>
|
||||
|
||||
<local:Appearances x:Name="UnfocusedAppearanceView"
|
||||
Appearance="{x:Bind Profile.UnfocusedAppearance, Mode=OneWay}"
|
||||
SourceProfile="{x:Bind Profile, Mode=OneWay}"
|
||||
WindowRoot="{x:Bind WindowRoot, Mode=OneTime}" />
|
||||
|
||||
<!-- Delete Unfocused Appearance -->
|
||||
<local:SettingsCard x:Name="DeleteUnfocusedAppearance"
|
||||
x:Uid="Profile_DeleteUnfocusedAppearance"
|
||||
Margin="0,18,0,0">
|
||||
<local:SettingsCard.HeaderIcon>
|
||||
<FontIcon Glyph="" />
|
||||
</local:SettingsCard.HeaderIcon>
|
||||
<Button x:Name="DeleteUnfocusedAppearanceButton"
|
||||
x:Uid="Profile_DeleteUnfocusedAppearanceButton"
|
||||
Click="DeleteUnfocusedAppearance_Click"
|
||||
Style="{StaticResource DeleteButtonStyle}">
|
||||
<TextBlock x:Uid="Profile_DeleteAppearanceButton" />
|
||||
</Button>
|
||||
</local:SettingsCard>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>Unscharfes Erscheinungsbild</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Erscheinungsbild erstellen</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Löschen</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>Wenn diese Option aktiviert ist, werden alle installierten Schriftarten in der Liste oben angezeigt. Andernfalls wird nur die Liste der Schriftarten mit fester Breite angezeigt.</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Erscheinungsbild erstellen</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Erstellen Sie ein unscharfes Erscheinungsbild für dieses Profil. So sieht das Profil aus, als ob es inaktiv ist.</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Erscheinungsbild löschen</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -757,6 +757,10 @@
|
||||
<value>Appearance</value>
|
||||
<comment>Header for a sub-page of profile settings focused on customizing the appearance of the profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_UnfocusedAppearanceNone" xml:space="preserve">
|
||||
<value>None</value>
|
||||
<comment>Shown on the "Unfocused appearance" navigator card when no unfocused appearance has been defined for the profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_BackgroundImageBox.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Background image path</value>
|
||||
<comment>Name for a control to determine the image presented on the background of the app.</comment>
|
||||
@@ -1241,10 +1245,6 @@
|
||||
<value>Unfocused appearance</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Create Appearance</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1593,6 +1593,10 @@
|
||||
<value>Customize the visual appearance of the profile, including colors, fonts, and text styling.</value>
|
||||
<comment>Description shown below the "Appearance" navigator card on the profile page.</comment>
|
||||
</data>
|
||||
<data name="Profile_UnfocusedAppearanceNavigator.Description" xml:space="preserve">
|
||||
<value>Customize the appearance of the profile when it is inactive (unfocused).</value>
|
||||
<comment>Description shown below the "Unfocused appearance" navigator card on the profile page.</comment>
|
||||
</data>
|
||||
<data name="Profile_TerminalNavigator.Description" xml:space="preserve">
|
||||
<value>Configure how the terminal interprets text and control sequences to behave like a traditional command-line terminal</value>
|
||||
<comment>Description shown below the "Terminal Emulation" navigator card on the profile page.</comment>
|
||||
@@ -1769,14 +1773,6 @@
|
||||
<value>If enabled, show all installed fonts in the list above. Otherwise, only show the list of monospace fonts.</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Create Appearance</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Create an unfocused appearance for this profile. This will be the appearance of the profile when it is inactive.</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Delete Appearance</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
@@ -1785,6 +1781,14 @@
|
||||
<value>Delete the unfocused appearance for this profile.</value>
|
||||
<comment>A description for what the delete unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearance.Header" xml:space="preserve">
|
||||
<value>Delete this unfocused appearance</value>
|
||||
<comment>Header for a settings card that deletes the profile's unfocused appearance.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearance.Description" xml:space="preserve">
|
||||
<value>Removes the unfocused appearance so the profile uses its default appearance when inactive</value>
|
||||
<comment>Description for the delete unfocused appearance settings card.</comment>
|
||||
</data>
|
||||
<data name="Actions_Disclaimer.Content" xml:space="preserve">
|
||||
<value>Learn more about actions</value>
|
||||
<comment>Disclaimer presented at the top of the actions page to redirect the user to documentation regarding actions.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>Apariencia desenfocada</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Crear apariencia</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Eliminar</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>Si está habilitada, muestra todas las fuentes instaladas en la lista anterior. De lo contrario, mostrar solo la lista de fuentes monoespacios.</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Crear apariencia</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Crea una apariencia no centrada para este perfil. Esta será la apariencia del perfil cuando esté inactivo.</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Eliminar apariencia</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>Apparence sans focus</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Créer une apparence</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Supprimer</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>Si cette option est activée, toutes les polices installées sont affichées dans la liste ci-dessus. Sinon, affiche uniquement la liste des polices à espacement fixe.</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Créer une apparence</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Créez une apparence sans focus pour ce profil. Il s’agit de l’apparence du profil lorsqu’il est inactif.</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Supprimer une apparence</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>Aspetto con stato non attivo</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Crea aspetto</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Elimina</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>Se abilitata, mostra tutti i tipi di carattere installati nell'elenco precedente. In caso contrario, visualizza solo l'elenco dei tipi di carattere a spaziatura fissa.</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Crea aspetto</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Crea un aspetto non attivo per questo profilo. Questo sarà l'aspetto del profilo quando è inattivo.</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Elimina aspetto</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>フォーカスされていない外観</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>外観の作成</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>削除</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>有効にすると、上の一覧にあるインストールされたすべてのフォントが表示されます。無効の場合は、等幅フォントの一覧のみが表示されます。</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>外観の作成</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>このプロファイルのフォーカスされていない外観を作成します。これは、プロファイルが非アクティブな場合の外観になります。</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>外観の削除</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>포커스되지 않는 모양</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>모양 만들기</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>삭제</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>사용하도록 설정된 경우 위의 목록에 설치된 모든 글꼴을 표시합니다. 그렇지 않으면 고정 폭 글꼴 목록만 표시합니다.</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>모양 만들기</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>이 프로필에 대해 할당되지 않은 모양을 만듭니다. 프로필이 비활성 상태인 경우 프로필의 모양이 됩니다.</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>모양 삭제</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>Aparência sem foco</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Criar Aparência</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Excluir</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>Se ativado, mostra todas as fontes instaladas na lista acima. Caso contrário, mostra apenas as fontes monoespaçadas.</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Criar Aparência</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Crie uma aparência sem foco para este perfil. Esta será a aparência do perfil quando ele estiver inativo.</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Excluir Aparência</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>Ûηƒŏċμşεď äррėāŕαńćё !!! !!!</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Ĉřêάŧэ Δрφзάŕãñςε !!! !!</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Ðéľėŧê !</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>Įƒ ěлåвℓεď, šħöω ăℓŀ їήšτаļľêð ƒõņŧŝ ίл τне ľíşť ªвσνє. Öťĥέŕωíŝě, ôπľγ ŝĥσẃ ţĥэ ľíѕτ θƒ mōйǿѕφâčз ƒоņτŝ. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Çřëаţë Ăφрзαѓăʼn¢έ !!! !!</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Ċґêâŧέ āл ûηƒοćüšεð аφрěąґªŋčέ ƒòř тнìş φřòƒîľέ. Ţнīѕ ωïĺľ вé ťнē αррêãřªήç℮ οƒ ŧћê ρґőƒίļė ŵħėņ īŧ ίš ïńαčτîν℮. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! </value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Ďєľéтę Āρρєαяâп¢ė !!! !!</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>Ûηƒŏċμşεď äррėāŕαńćё !!! !!!</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Ĉřêάŧэ Δрφзάŕãñςε !!! !!</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Ðéľėŧê !</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>Įƒ ěлåвℓεď, šħöω ăℓŀ їήšτаļľêð ƒõņŧŝ ίл τне ľíşť ªвσνє. Öťĥέŕωíŝě, ôπľγ ŝĥσẃ ţĥэ ľíѕτ θƒ mōйǿѕφâčз ƒоņτŝ. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Çřëаţë Ăφрзαѓăʼn¢έ !!! !!</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Ċґêâŧέ āл ûηƒοćüšεð аφрěąґªŋčέ ƒòř тнìş φřòƒîľέ. Ţнīѕ ωïĺľ вé ťнē αррêãřªήç℮ οƒ ŧћê ρґőƒίļė ŵħėņ īŧ ίš ïńαčτîν℮. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! </value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Ďєľéтę Āρρєαяâп¢ė !!! !!</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>Ûηƒŏċμşεď äррėāŕαńćё !!! !!!</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Ĉřêάŧэ Δрφзάŕãñςε !!! !!</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Ðéľėŧê !</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>Įƒ ěлåвℓεď, šħöω ăℓŀ їήšτаļľêð ƒõņŧŝ ίл τне ľíşť ªвσνє. Öťĥέŕωíŝě, ôπľγ ŝĥσẃ ţĥэ ľíѕτ θƒ mōйǿѕφâčз ƒоņτŝ. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Çřëаţë Ăφрзαѓăʼn¢έ !!! !!</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Ċґêâŧέ āл ûηƒοćüšεð аφрěąґªŋčέ ƒòř тнìş φřòƒîľέ. Ţнīѕ ωïĺľ вé ťнē αррêãřªήç℮ οƒ ŧћê ρґőƒίļė ŵħėņ īŧ ίš ïńαčτîν℮. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! </value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Ďєľéтę Āρρєαяâп¢ė !!! !!</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>Внешний вид без фокуса</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Создать внешний вид</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Удалить</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>Если этот параметр включен, отобразятся все установленные шрифты в приведенном выше списке. В противном случае будет показан только список моноширинных шрифтов.</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Создать внешний вид</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Добавление настроек внешнего вида профиля, когда он не используется. Эти параметры будут применяться к профилю, когда он не активен.</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Удалить внешний вид</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1206,10 +1206,6 @@
|
||||
<value>Изглед ван фокуса</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Креирај изглед</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Обриши</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1702,14 +1698,6 @@
|
||||
<value>Ако је укључено, горња листа приказује све инсталиране фонтове. У супротном, приказује се само листа фонтова фиксне ширине.</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Креирај изглед</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Креира за овај профил изглед када није у фокусу. То ће бити изглед профила када није активан.</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Обриши изглед</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>Зовнішній вигляд несфокусованого вікна</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Створення зовнішнього вигляду</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>Видалити</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1768,14 +1764,6 @@
|
||||
<value>Якщо ввімкнено, показувати всі встановлені шрифти у списку вище. В іншому випадку відобразити лише список моноширинних шрифтів.</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Створення зовнішнього вигляду</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Створити вигляд для цього профілю коли він не фокусі. Так виглядатиме профіль, коли він неактивний.</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Видалити зовнішній вигляд</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>无焦点外观</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>创建外观</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>删除</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>如果启用,则在上面的列表中显示所有已安装的字体。否则,仅显示等宽字体列表。</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>创建外观</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>创建此配置文件的无焦点外观。这将是配置文件处于非活动状态时的外观。</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>删除外观</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -1241,10 +1241,6 @@
|
||||
<value>非焦點外觀</value>
|
||||
<comment>The header for the section where the unfocused appearance settings can be changed.</comment>
|
||||
</data>
|
||||
<data name="Profile_AddAppearanceButton.Text" xml:space="preserve">
|
||||
<value>建立外觀</value>
|
||||
<comment>Button label that adds an unfocused appearance for this profile.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteAppearanceButton.Text" xml:space="preserve">
|
||||
<value>刪除</value>
|
||||
<comment>Button label that deletes the unfocused appearance for this profile.</comment>
|
||||
@@ -1741,14 +1737,6 @@
|
||||
<value>如果啟用,顯示上述清單中所有已安裝的字型。否則,僅顯示等寬字型清單。</value>
|
||||
<comment>A description for what the supplementary "show all fonts" setting does. Presented near "Profile_FontFaceShowAllFonts".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>建立外觀</value>
|
||||
<comment>Name for a control which creates the unfocused appearance settings for this profile. Text must match that of "Profile_AddAppearanceButton.Text".</comment>
|
||||
</data>
|
||||
<data name="Profile_CreateUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>立此設定檔的非焦點外觀。這會是設定檔處於非使用中狀態時的外觀。</value>
|
||||
<comment>A description for what the create unfocused appearance button does.</comment>
|
||||
</data>
|
||||
<data name="Profile_DeleteUnfocusedAppearanceButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>刪除外觀</value>
|
||||
<comment>Name for a control which deletes the unfocused appearance settings for this profile.</comment>
|
||||
|
||||
@@ -25,7 +25,8 @@ $ProhibitedUids = @(
|
||||
"ColorScheme_ColorsHeader",
|
||||
"ColorScheme_Rename",
|
||||
"Profile_ResetProfile",
|
||||
"Profile_DeleteProfile"
|
||||
"Profile_DeleteProfile",
|
||||
"Profile_DeleteUnfocusedAppearance"
|
||||
)
|
||||
|
||||
# Prohibited XAML files (already limited to Page root elements)
|
||||
@@ -93,6 +94,11 @@ $ClassMap = @{
|
||||
NavigationParam = "GlobalProfile_Nav"
|
||||
SubPage = "BreadcrumbSubPage::Profile_Appearance"
|
||||
}
|
||||
"Microsoft::Terminal::Settings::Editor::Profiles_UnfocusedAppearance" = @{
|
||||
ResourceName = "Nav_ProfileDefaults/Content"
|
||||
NavigationParam = "GlobalProfile_Nav"
|
||||
SubPage = "BreadcrumbSubPage::Profile_UnfocusedAppearance"
|
||||
}
|
||||
"Microsoft::Terminal::Settings::Editor::Profiles_Terminal" = @{
|
||||
ResourceName = "Nav_ProfileDefaults/Content"
|
||||
NavigationParam = "GlobalProfile_Nav"
|
||||
@@ -113,6 +119,7 @@ $ClassMap = @{
|
||||
function IsProfileSubPage($pageClass)
|
||||
{
|
||||
return $pageClass -match "Editor::Profiles_Appearance" -or
|
||||
$pageClass -match "Editor::Profiles_UnfocusedAppearance" -or
|
||||
$pageClass -match "Editor::Profiles_Terminal" -or
|
||||
$pageClass -match "Editor::Profiles_Advanced"
|
||||
}
|
||||
@@ -200,9 +207,10 @@ foreach ($xamlFile in Get-ChildItem -Path $SourceDir -Filter *.xaml)
|
||||
# - no UID because we want to reuse existing resources to reduce localization burden
|
||||
# - when selected, we want to navigate to the subpage (not focus the navigator)
|
||||
$navigators = @(
|
||||
@{ Resource = "Profile_Appearance/Header"; SubPage = "BreadcrumbSubPage::Profile_Appearance" }
|
||||
@{ Resource = "Profile_Terminal/Header"; SubPage = "BreadcrumbSubPage::Profile_Terminal" }
|
||||
@{ Resource = "Profile_Advanced/Header"; SubPage = "BreadcrumbSubPage::Profile_Advanced" }
|
||||
@{ Resource = "Profile_Appearance/Header"; SubPage = "BreadcrumbSubPage::Profile_Appearance" }
|
||||
@{ Resource = "Profile_UnfocusedAppearanceTextBlock/Text"; SubPage = "BreadcrumbSubPage::Profile_UnfocusedAppearance" }
|
||||
@{ Resource = "Profile_Terminal/Header"; SubPage = "BreadcrumbSubPage::Profile_Terminal" }
|
||||
@{ Resource = "Profile_Advanced/Header"; SubPage = "BreadcrumbSubPage::Profile_Advanced" }
|
||||
)
|
||||
foreach ($nav in $navigators)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user