* Update settings window layout with consistent margins Updated the layout of the different views of the settings window so that there is always margin at the bottom. In some cases this was achieved using <StackPanels> for clarity and extensibility, grouping e.g. a title and some radio options together with one unified margin. Also made some small consistency changes to the .xaml files. * Add width to Themes text input * Normalize margins in settings * Add default display values in Terminal settings ... for Arguments and Working Directory * Generalize TemplateSelector for empty strings * Add default display value for profile keybindings * Update margins and fontsize in theme preview * Update 'loading...' message in About ... to "Checking for updates..." and a spinner as suggested by @skipmeister123 * No popup when cancelling profile edit no changes * Delete profile when new and cancelled * Open new and cloned themes in edit mode ... and make it so canceling deletes the theme. * No popup when cancelling theme edit no changes * Add resources for margin definitions * Check for null Author in TerminalTheme * Add resource for header margin definition * Moved createdBy text to code behind
127 lines
5.9 KiB
XML
127 lines
5.9 KiB
XML
<Page
|
|
x:Class="FluentTerminal.App.Views.SettingsPages.GeneralSettings"
|
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d">
|
|
<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}"
|
|
Text="General" />
|
|
<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">
|
|
<StackPanel Margin="{StaticResource ContainerMargin}">
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<ToggleSwitch
|
|
Header="Run on startup"
|
|
IsEnabled="{x:Bind ViewModel.CanEnableStartupTask, Mode=OneWay}"
|
|
IsOn="{x:Bind ViewModel.StartupTaskEnabled, Mode=TwoWay}" />
|
|
<TextBlock
|
|
Foreground="Red"
|
|
Text="{x:Bind ViewModel.StartupTaskErrorMessage, Mode=OneWay}"
|
|
Visibility="{x:Bind ViewModel.CanEnableStartupTask, Mode=OneWay, Converter={StaticResource FalseToVisibleConverter}}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<ToggleSwitch Header="Show in system tray" IsOn="{x:Bind ViewModel.EnableTrayIcon, Mode=TwoWay}" />
|
|
<TextBlock
|
|
Foreground="Red"
|
|
Text="Relaunch required to apply setting"
|
|
Visibility="{x:Bind ViewModel.ShouldRestartForTrayMessage, Mode=OneWay, Converter={StaticResource TrueToVisibleConverter}}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<TextBlock Margin="0,0,0,8" Text="Open new terminals as" />
|
|
<RadioButton
|
|
Content="Tabs"
|
|
GroupName="NewTerminalLocation"
|
|
IsChecked="{x:Bind ViewModel.TabIsSelected, Mode=TwoWay}" />
|
|
<RadioButton
|
|
Content="Windows"
|
|
GroupName="NewTerminalLocation"
|
|
IsChecked="{x:Bind ViewModel.WindowIsSelected, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<TextBlock Margin="0,0,0,8" Text="Show tabs on" />
|
|
<RadioButton
|
|
Content="Top"
|
|
GroupName="TabsPosition"
|
|
IsChecked="{x:Bind ViewModel.TopIsSelected, Mode=TwoWay}" />
|
|
<RadioButton
|
|
Content="Bottom"
|
|
GroupName="TabsPosition"
|
|
IsChecked="{x:Bind ViewModel.BottomIsSelected, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
|
|
<ToggleSwitch
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Always show tabs"
|
|
IsOn="{x:Bind ViewModel.AlwaysShowTabs, Mode=TwoWay}" />
|
|
|
|
<ToggleSwitch
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Underline selected tab"
|
|
IsOn="{x:Bind ViewModel.UnderlineSelectedTab, Mode=TwoWay}" />
|
|
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<TextBlock Margin="0,0,0,8" Text="Color on inactive tabs" />
|
|
<RadioButton
|
|
Content="Background"
|
|
GroupName="InactiveTabColorMode"
|
|
IsChecked="{x:Bind ViewModel.BackgroundIsSelected, Mode=TwoWay}" />
|
|
<RadioButton
|
|
Content="Underline"
|
|
GroupName="InactiveTabColorMode"
|
|
IsChecked="{x:Bind ViewModel.UnderlinedIsSelected, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
|
|
<ToggleSwitch
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Ask before closing windows"
|
|
IsOn="{x:Bind ViewModel.ConfirmClosingWindows, Mode=TwoWay}" />
|
|
|
|
<ToggleSwitch
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Ask before closing tabs"
|
|
IsOn="{x:Bind ViewModel.ConfirmClosingTabs, Mode=TwoWay}" />
|
|
|
|
<ToggleSwitch
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Show new output indicator on background tabs"
|
|
IsOn="{x:Bind ViewModel.ShowNewOutputIndicator, Mode=TwoWay}" />
|
|
|
|
<ToggleSwitch
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Windows 10 1809+: Always use WinPty"
|
|
IsOn="{x:Bind ViewModel.AlwaysUseWinPty, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Page>
|