* add padding setting * `=` instead of `:` Co-Authored-By: fauzie811 <fauzie811@yahoo.com> * call setPadding in createTerminal function * Add "px" suffix to padding slider tooltip Based on this tutorial: https://www.codeproject.com/Tips/715438/Slider-Thumb-Tooltip * term.fit() after setPadding() * move back term.fit() below term.open() * Changed max value, added throttling, moved converter
115 lines
5.0 KiB
XML
115 lines
5.0 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"
|
|
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="24,00,0,24">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock
|
|
Margin="0,10,0,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="28"
|
|
Style="{StaticResource TitleTextBlockStyle}"
|
|
Text="Terminal" />
|
|
<CommandBar
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Top"
|
|
Background="{ThemeResource SystemControlBackgroundAltHighBrush}"
|
|
DefaultLabelPosition="Right">
|
|
<AppBarButton
|
|
Command="{x:Bind ViewModel.RestoreDefaultsCommand}"
|
|
Icon="Undo"
|
|
Label="Restore Defaults" />
|
|
</CommandBar>
|
|
</Grid>
|
|
<ScrollViewer Grid.Row="2" Margin="24,0,0,0">
|
|
<StackPanel>
|
|
<ComboBox
|
|
Width="200"
|
|
Margin="0,0,0,24"
|
|
Header="Font family"
|
|
ItemsSource="{x:Bind ViewModel.Fonts}"
|
|
SelectedValue="{x:Bind ViewModel.FontFamily, Mode=TwoWay}" />
|
|
<ComboBox
|
|
Width="200"
|
|
Margin="0,0,0,24"
|
|
Header="Font size"
|
|
ItemsSource="{x:Bind ViewModel.Sizes}"
|
|
SelectedValue="{x:Bind ViewModel.FontSize, Mode=TwoWay}" />
|
|
<Slider
|
|
Width="200"
|
|
Margin="0,0,0,24"
|
|
HorizontalAlignment="Left"
|
|
Header="Background opacity"
|
|
Maximum="1"
|
|
Minimum="0"
|
|
StepFrequency="0.01"
|
|
Value="{x:Bind ViewModel.BackgroundOpacity, Mode=TwoWay}" />
|
|
<Slider
|
|
Width="200"
|
|
Margin="0,0,0,24"
|
|
HorizontalAlignment="Left"
|
|
Header="Padding"
|
|
Maximum="64"
|
|
Minimum="0"
|
|
StepFrequency="1"
|
|
ThumbToolTipValueConverter="{StaticResource ToolTipValueToPixelConverter}"
|
|
Value="{x:Bind ViewModel.Padding, Mode=TwoWay}" />
|
|
<TextBox
|
|
Width="200"
|
|
Margin="0,0,0,24"
|
|
HorizontalAlignment="Left"
|
|
Header="Scrollback limit"
|
|
KeyDown="ScrollBackTextBoxOnKeyDown"
|
|
Text="{x:Bind ViewModel.ScrollBackLimit, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
<ToggleSwitch
|
|
Margin="0,0,0,24"
|
|
Header="Blinking cursor"
|
|
IsOn="{x:Bind ViewModel.CursorBlink, Mode=TwoWay}" />
|
|
<TextBlock Margin="0,0,0,8" Text="Cursor style" />
|
|
<RadioButton
|
|
Content="Block"
|
|
GroupName="Cursor"
|
|
IsChecked="{x:Bind ViewModel.BlockIsSelected, Mode=TwoWay}" />
|
|
<RadioButton
|
|
Content="Underline"
|
|
GroupName="Cursor"
|
|
IsChecked="{x:Bind ViewModel.UnderlineIsSelected, Mode=TwoWay}" />
|
|
<RadioButton
|
|
Content="Bar"
|
|
GroupName="Cursor"
|
|
IsChecked="{x:Bind ViewModel.BarIsSelected, Mode=TwoWay}" />
|
|
|
|
<TextBlock Margin="0,24,0,8" Text="Scrollbar style" />
|
|
<RadioButton
|
|
Content="Hidden"
|
|
GroupName="ScrollBar"
|
|
IsChecked="{x:Bind ViewModel.HiddenIsSelected, Mode=TwoWay}" />
|
|
<RadioButton
|
|
Content="Auto hiding"
|
|
GroupName="ScrollBar"
|
|
IsChecked="{x:Bind ViewModel.AutoHidingIsSelected, Mode=TwoWay}" />
|
|
<RadioButton
|
|
Content="Visible"
|
|
GroupName="ScrollBar"
|
|
IsChecked="{x:Bind ViewModel.VisibleIsSelected, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Page> |