Files
FluentTerminal/FluentTerminal.App/Views/SettingsPages/TerminalSettings.xaml
T
Jenia Dysin 21631f5cca Add font weight setting (#560)
* Added font weight setting functionality

* Removed BoldText setting
2019-10-30 22:57:36 +01:00

173 lines
7.5 KiB
XML

<Page
x:Class="FluentTerminal.App.Views.SettingsPages.TerminalSettings"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:FluentTerminal.App.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="using:FluentTerminal.Models"
mc:Ignorable="d">
<Page.Resources>
<converters:ToolTipValueToPixelConverter x:Key="ToolTipValueToPixelConverter" />
</Page.Resources>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="1" Margin="{StaticResource HeaderMargin}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock
Margin="0,10,0,0"
VerticalAlignment="Center"
FontSize="28"
Style="{StaticResource TitleTextBlockStyle}"
x:Uid="Terminal"
Text="Terminal" />
<CommandBar
Grid.Column="1"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Background="{ThemeResource SystemControlBackgroundAltHighBrush}"
DefaultLabelPosition="Right">
<AppBarButton
Command="{x:Bind ViewModel.RestoreDefaultsCommand}"
Icon="Undo"
x:Uid="Restore"
Label="Restore Defaults" />
</CommandBar>
</Grid>
<ScrollViewer Grid.Row="2">
<StackPanel Margin="{StaticResource ContainerMargin}">
<ComboBox
Width="200"
Margin="{StaticResource ItemMargin}"
x:Uid="FontFamily"
Header="Font family"
ItemsSource="{x:Bind ViewModel.Fonts}"
SelectedValue="{x:Bind ViewModel.FontFamily, Mode=TwoWay}"
SelectedValuePath="Name">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="models:FontInfo">
<TextBlock FontWeight="{x:Bind IsMonospaced, Converter={StaticResource TrueToBoldConverter}}" Text="{x:Bind Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<ComboBox
Width="200"
Margin="{StaticResource ItemMargin}"
x:Uid="FontSize"
Header="Font size"
ItemsSource="{x:Bind ViewModel.Sizes}"
SelectedValue="{x:Bind ViewModel.FontSize, Mode=TwoWay}" />
<Slider
Width="200"
Margin="{StaticResource ItemMargin}"
HorizontalAlignment="Left"
x:Uid="FontWeight"
Header="Font Weight"
Maximum="900"
Minimum="100"
StepFrequency="100"
Value="{x:Bind ViewModel.FontWeight, Mode=TwoWay}" />
<Slider
Width="200"
Margin="{StaticResource ItemMargin}"
HorizontalAlignment="Left"
x:Uid="BackgroundOpacity"
Header="Background opacity"
Maximum="1"
Minimum="0"
StepFrequency="0.01"
Value="{x:Bind ViewModel.BackgroundOpacity, Mode=TwoWay}" />
<Slider
Width="200"
Margin="{StaticResource ItemMargin}"
HorizontalAlignment="Left"
x:Uid="Padding"
Header="Padding"
Maximum="64"
Minimum="0"
StepFrequency="1"
ThumbToolTipValueConverter="{StaticResource ToolTipValueToPixelConverter}"
Value="{x:Bind ViewModel.Padding, Mode=TwoWay}" />
<TextBox
Width="200"
Margin="{StaticResource ItemMargin}"
HorizontalAlignment="Left"
x:Uid="ScrollbackLimit"
Header="Scrollback limit"
KeyDown="ScrollBackTextBoxOnKeyDown"
Text="{x:Bind ViewModel.ScrollBackLimit, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<ToggleSwitch
Margin="{StaticResource ItemMargin}"
x:Uid="BlinkingCursor"
Header="Blinking cursor"
IsOn="{x:Bind ViewModel.CursorBlink, Mode=TwoWay}" />
<StackPanel Margin="{StaticResource ItemMargin}">
<TextBlock Margin="0,0,0,8" x:Uid="CursorStyle" Text="Cursor style" />
<RadioButton
x:Uid="CursorBlock"
Content="Block"
GroupName="Cursor"
IsChecked="{x:Bind ViewModel.BlockIsSelected, Mode=TwoWay}" />
<RadioButton
x:Uid="CursorUnderline"
Content="Underline"
GroupName="Cursor"
IsChecked="{x:Bind ViewModel.UnderlineIsSelected, Mode=TwoWay}" />
<RadioButton
x:Uid="CursorBar"
Content="Bar"
GroupName="Cursor"
IsChecked="{x:Bind ViewModel.BarIsSelected, Mode=TwoWay}" />
</StackPanel>
<StackPanel Margin="{StaticResource ItemMargin}">
<TextBlock Margin="0,0,0,8" x:Uid="ScrollbarStyle" Text="Scrollbar style" />
<RadioButton
x:Uid="ScrollBarHidden"
Content="Hidden"
GroupName="ScrollBar"
IsChecked="{x:Bind ViewModel.HiddenIsSelected, Mode=TwoWay}" />
<RadioButton
x:Uid="ScrollBarAuto"
Content="Auto hiding"
GroupName="ScrollBar"
IsChecked="{x:Bind ViewModel.AutoHidingIsSelected, Mode=TwoWay}" />
<RadioButton
x:Uid="ScrollBarVisible"
Content="Visible"
GroupName="ScrollBar"
IsChecked="{x:Bind ViewModel.VisibleIsSelected, Mode=TwoWay}" />
</StackPanel>
<ToggleSwitch
Margin="{StaticResource ItemMargin}"
x:Uid="CopiedNotification"
Header="Text copied notification"
IsOn="{x:Bind ViewModel.ShowTextCopied, Mode=TwoWay}" />
<TextBox
Width="200"
Margin="{StaticResource ItemMargin}"
HorizontalAlignment="Left"
x:Uid="WordSeparator"
Header="Select-by-word characters"
Text="{x:Bind ViewModel.WordSeparator, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
</ScrollViewer>
</Grid>
</Page>