2020-12-11 22:34:21 +01:00
|
|
|
<!-- 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.Launch"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:local="using:Microsoft.Terminal.Settings.Editor"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
|
|
|
xmlns:SettingsModel="using:Microsoft.Terminal.Settings.Model"
|
|
|
|
mc:Ignorable="d">
|
|
|
|
|
|
|
|
<Page.Resources>
|
|
|
|
<ResourceDictionary>
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
<ResourceDictionary Source="CommonResources.xaml"/>
|
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
|
|
|
<DataTemplate x:DataType="local:EnumEntry" x:Key="EnumRadioButtonTemplate">
|
|
|
|
<RadioButton Content="{x:Bind EnumName, Mode=OneWay}"
|
|
|
|
Style="{StaticResource RadioButtonSettingStyle}"/>
|
|
|
|
</DataTemplate>
|
|
|
|
<SettingsModel:IconPathConverter x:Key="IconSourceConverter"/>
|
|
|
|
</ResourceDictionary>
|
|
|
|
</Page.Resources>
|
|
|
|
|
|
|
|
<ScrollViewer>
|
|
|
|
<StackPanel Style="{StaticResource SettingsStackStyle}">
|
|
|
|
<!--Default Profile-->
|
|
|
|
<ContentPresenter Style="{StaticResource SettingContainerStyle}">
|
|
|
|
<ComboBox x:Uid="Globals_DefaultProfile"
|
|
|
|
x:Name="DefaultProfile"
|
|
|
|
ItemsSource="{x:Bind State.Settings.AllProfiles, Mode=OneWay}"
|
|
|
|
SelectedItem="{x:Bind CurrentDefaultProfile, Mode=TwoWay}"
|
|
|
|
Style="{StaticResource ComboBoxSettingStyle}">
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate x:DataType="SettingsModel:Profile">
|
|
|
|
<Grid HorizontalAlignment="Stretch" ColumnSpacing="8">
|
|
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<!-- icon -->
|
|
|
|
<ColumnDefinition Width="16"/>
|
|
|
|
<!-- profile name -->
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<IconSourceElement
|
|
|
|
Grid.Column="0"
|
|
|
|
Width="16"
|
|
|
|
Height="16"
|
|
|
|
IconSource="{x:Bind Icon,
|
|
|
|
Mode=OneWay,
|
|
|
|
Converter={StaticResource IconSourceConverter}}"/>
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="1"
|
|
|
|
Text="{x:Bind Name}"
|
|
|
|
FontSize="{StaticResource StandardFontSize}"/>
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
|
|
|
</ContentPresenter>
|
|
|
|
|
|
|
|
<!--Start on User Login-->
|
|
|
|
<ContentPresenter Style="{StaticResource SettingContainerStyle}">
|
|
|
|
<CheckBox x:Uid="Globals_StartOnUserLogin"
|
|
|
|
IsChecked="{x:Bind State.Settings.GlobalSettings.StartOnUserLogin, Mode=TwoWay}"
|
|
|
|
Style="{StaticResource CheckBoxSettingStyle}"/>
|
|
|
|
</ContentPresenter>
|
|
|
|
|
|
|
|
<!--Launch Mode-->
|
|
|
|
<ContentPresenter Style="{StaticResource SettingContainerStyle}">
|
|
|
|
<muxc:RadioButtons x:Uid="Globals_LaunchMode"
|
|
|
|
SelectedItem="{x:Bind CurrentLaunchMode}"
|
|
|
|
ItemsSource="{x:Bind LaunchModeList}"
|
|
|
|
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"
|
|
|
|
Style="{StaticResource RadioButtonsSettingStyle}"/>
|
|
|
|
</ContentPresenter>
|
|
|
|
|
|
|
|
<!--Launch Size-->
|
|
|
|
<ContentPresenter Style="{StaticResource SettingContainerStyle}">
|
|
|
|
<Grid>
|
|
|
|
<Grid.Resources>
|
|
|
|
<Style x:Key="LaunchSizeSubHeaderStyle" TargetType="TextBlock">
|
|
|
|
<Setter Property="FontSize" Value="{StaticResource StandardFontSize}"/>
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
<Setter Property="Margin" Value="0,0,5,0"/>
|
|
|
|
</Style>
|
|
|
|
<Style x:Key="LaunchSizeNumberBoxStyle" TargetType="muxc:NumberBox" BasedOn="{StaticResource NumberBoxSettingStyle}">
|
|
|
|
<Setter Property="SmallChange" Value="1"/>
|
|
|
|
<Setter Property="LargeChange" Value="10"/>
|
2021-01-14 02:34:43 +01:00
|
|
|
<Setter Property="Minimum" Value="1"/>
|
2020-12-11 22:34:21 +01:00
|
|
|
</Style>
|
|
|
|
</Grid.Resources>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="auto"/>
|
|
|
|
<RowDefinition Height="auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="auto"/>
|
|
|
|
<ColumnDefinition Width="auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<!--Header-->
|
|
|
|
<TextBlock x:Uid="Globals_LaunchSize"
|
|
|
|
Grid.Row="0" Grid.Column="0"
|
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
Style="{StaticResource CustomSettingHeaderStyle}"/>
|
|
|
|
|
|
|
|
<!--Columns-->
|
|
|
|
<StackPanel Orientation="Horizontal"
|
|
|
|
Grid.Row="1" Grid.Column="0"
|
|
|
|
Margin="0,0,10,0">
|
|
|
|
<TextBlock x:Uid="Globals_InitialCols" Style="{StaticResource LaunchSizeSubHeaderStyle}"/>
|
|
|
|
<muxc:NumberBox Value="{x:Bind State.Settings.GlobalSettings.InitialCols, Mode=TwoWay}"
|
|
|
|
Style="{StaticResource LaunchSizeNumberBoxStyle}"/>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<!--Rows-->
|
|
|
|
<StackPanel Orientation="Horizontal"
|
|
|
|
Grid.Row="1" Grid.Column="1">
|
|
|
|
<TextBlock x:Uid="Globals_InitialRows" Style="{StaticResource LaunchSizeSubHeaderStyle}"/>
|
|
|
|
<muxc:NumberBox Value="{x:Bind State.Settings.GlobalSettings.InitialRows, Mode=TwoWay}"
|
|
|
|
Style="{StaticResource LaunchSizeNumberBoxStyle}"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</ContentPresenter>
|
|
|
|
</StackPanel>
|
|
|
|
</ScrollViewer>
|
|
|
|
</Page>
|