2c0b09a9ad
调整多个设置页面的滑块控件布局,统一使用SimpleStackPanel水平排列滑块和数值显示文本,增加数值显示的Consolas字体样式,并统一滑块宽度为200像素
200 lines
12 KiB
XML
200 lines
12 KiB
XML
<ui:Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.AdvancedPage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
|
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
|
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
|
|
mc:Ignorable="d"
|
|
Title="{i18n:I18n Key=Advanced_Title}">
|
|
|
|
<ScrollViewer PanningMode="VerticalFirst">
|
|
<Grid Margin="59,0,59,0">
|
|
<FrameworkElement.Resources>
|
|
<sys:Double x:Key="SettingsCardSpacing">4</sys:Double>
|
|
<Style x:Key="SettingsSectionHeaderTextBlockStyle"
|
|
BasedOn="{StaticResource BodyStrongTextBlockStyle}"
|
|
TargetType="TextBlock">
|
|
<Style.Setters>
|
|
<Setter Property="Margin" Value="1,30,0,6" />
|
|
</Style.Setters>
|
|
</Style>
|
|
</FrameworkElement.Resources>
|
|
<Grid>
|
|
<ikw:SimpleStackPanel MaxWidth="1000"
|
|
HorizontalAlignment="Stretch"
|
|
Spacing="{StaticResource SettingsCardSpacing}">
|
|
|
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
|
Text="{i18n:I18n Key=Advanced_Title}" />
|
|
|
|
<controls:LabeledSettingsCard x:Name="ToggleSwitchIsSpecialScreen"
|
|
Header="{i18n:I18n Key=Advanced_SpecialScreenMode}"
|
|
Icon="{x:Static ui:SegoeFluentIcons.Settings}"
|
|
IsOn="True"
|
|
Toggled="ToggleSwitchIsSpecialScreen_OnToggled"/>
|
|
|
|
<controls:LabeledSettingsCard x:Name="ToggleSwitchDisableHardwareAcceleration"
|
|
Header="{i18n:I18n Key=Canvas_DisableHardwareAcceleration}"
|
|
Description="{i18n:I18n Key=Canvas_DisableHardwareAccelerationHint}"
|
|
Icon="{x:Static ui:SegoeFluentIcons.Settings}"
|
|
IsOn="False"
|
|
Toggled="ToggleSwitchDisableHardwareAcceleration_Toggled"/>
|
|
|
|
<ui:SettingsExpander x:Name="CardTouchMultiplier"
|
|
Header="{i18n:I18n Key=Advanced_TouchMultiplier}"
|
|
Description="{i18n:I18n Key=Advanced_TouchMultiplierHint}">
|
|
<ui:SettingsExpander.HeaderIcon>
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Touch}" />
|
|
</ui:SettingsExpander.HeaderIcon>
|
|
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
|
|
<TextBlock Text="{Binding Value, ElementName=TouchMultiplierSlider, StringFormat={}{0:F2}}"
|
|
VerticalAlignment="Center" FontFamily="Consolas"/>
|
|
<Slider x:Name="TouchMultiplierSlider"
|
|
Minimum="0" Maximum="2"
|
|
Width="200"
|
|
IsSnapToTickEnabled="True"
|
|
TickFrequency="0.01" TickPlacement="None"
|
|
ValueChanged="TouchMultiplierSlider_ValueChanged" />
|
|
</ikw:SimpleStackPanel>
|
|
<ui:SettingsExpander.Items>
|
|
<ui:SettingsCard Header="{i18n:I18n Key=Advanced_TouchMultiplierCalibrateHint}"
|
|
ContentAlignment="Left">
|
|
<ikw:SimpleStackPanel Spacing="8" Margin="0,4,0,4">
|
|
<TextBlock Text="{i18n:I18n Key=Advanced_TouchMultiplierValueHint}"
|
|
Foreground="{DynamicResource TextFillColorTertiaryBrush}"
|
|
TextWrapping="Wrap" MaxWidth="420" />
|
|
<Border Margin="0,0,20,0" CornerRadius="4" Height="48" Background="Transparent"
|
|
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}" BorderThickness="2"
|
|
TouchDown="BorderCalculateMultiplier_TouchDown" />
|
|
<TextBlock x:Name="TextBlockShowCalculatedMultiplier" FontSize="14" />
|
|
</ikw:SimpleStackPanel>
|
|
</ui:SettingsCard>
|
|
</ui:SettingsExpander.Items>
|
|
</ui:SettingsExpander>
|
|
|
|
<controls:LabeledSettingsCard x:Name="ToggleSwitchEraserBindTouchMultiplier"
|
|
Header="{i18n:I18n Key=Advanced_EraserBindTouchMultiplier}"
|
|
Description="{i18n:I18n Key=Advanced_EraserBindTouchHint}"
|
|
Icon="{x:Static ui:SegoeFluentIcons.EraseTool}"
|
|
IsOn="True"
|
|
Toggled="ToggleSwitchEraserBindTouchMultiplier_Toggled"/>
|
|
|
|
<ui:SettingsCard Header="{i18n:I18n Key=Advanced_NibModeBoundsWidthHeader}">
|
|
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
|
|
<TextBlock Text="{Binding Value, ElementName=NibModeBoundsWidthSlider}"
|
|
VerticalAlignment="Center" FontFamily="Consolas"/>
|
|
<Slider x:Name="NibModeBoundsWidthSlider"
|
|
Minimum="1" Maximum="50" Width="200"
|
|
IsSnapToTickEnabled="True" TickFrequency="1" Value="5"
|
|
TickPlacement="None"
|
|
ValueChanged="NibModeBoundsWidthSlider_ValueChanged" />
|
|
</ikw:SimpleStackPanel>
|
|
</ui:SettingsCard>
|
|
|
|
<ui:SettingsCard Header="{i18n:I18n Key=Advanced_FingerModeBoundsWidthHeader}">
|
|
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
|
|
<TextBlock Text="{Binding Value, ElementName=FingerModeBoundsWidthSlider}"
|
|
VerticalAlignment="Center" FontFamily="Consolas"/>
|
|
<Slider x:Name="FingerModeBoundsWidthSlider"
|
|
Minimum="1" Maximum="50" Width="200"
|
|
IsSnapToTickEnabled="True" TickFrequency="1" Value="20"
|
|
TickPlacement="None"
|
|
ValueChanged="FingerModeBoundsWidthSlider_ValueChanged" />
|
|
</ikw:SimpleStackPanel>
|
|
</ui:SettingsCard>
|
|
|
|
<controls:LabeledSettingsCard x:Name="ToggleSwitchIsQuadIR"
|
|
Header="{i18n:I18n Key=Advanced_QuadIRMode}"
|
|
Icon="{x:Static ui:SegoeFluentIcons.FullScreen}"
|
|
IsOn="True"
|
|
Toggled="ToggleSwitchIsQuadIR_Toggled"/>
|
|
|
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
|
Text="{i18n:I18n Key=Advanced_Logging}" />
|
|
|
|
<controls:LabeledSettingsCard x:Name="ToggleSwitchIsLogEnabled"
|
|
Header="{i18n:I18n Key=Advanced_Logging}"
|
|
Icon="{x:Static ui:SegoeFluentIcons.OpenFile}"
|
|
IsOn="True"
|
|
Toggled="ToggleSwitchIsLogEnabled_Toggled"/>
|
|
|
|
<controls:LabeledSettingsCard x:Name="ToggleSwitchIsSaveLogByDate"
|
|
Header="{i18n:I18n Key=Advanced_LogByDate}"
|
|
Description="{i18n:I18n Key=Advanced_LogRotateHint}"
|
|
IsOn="True"
|
|
Toggled="ToggleSwitchIsSaveLogByDate_Toggled"/>
|
|
|
|
<controls:LabeledSettingsCard x:Name="ToggleSwitchIsSecondConfimeWhenShutdownApp"
|
|
Header="{i18n:I18n Key=Advanced_ConfirmExit}"
|
|
Icon="{x:Static ui:SegoeFluentIcons.SignOut}"
|
|
IsOn="True"
|
|
Toggled="ToggleSwitchIsSecondConfimeWhenShutdownApp_Toggled"/>
|
|
|
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
|
Text="{i18n:I18n Key=Backup_Title}" />
|
|
|
|
<TextBlock Text="{i18n:I18n Key=Backup_Desc}"
|
|
Foreground="{DynamicResource TextFillColorTertiaryBrush}"
|
|
TextWrapping="Wrap" Margin="1,0,0,4" />
|
|
|
|
<controls:LabeledSettingsCard x:Name="ToggleSwitchIsAutoBackupBeforeUpdate"
|
|
Header="{i18n:I18n Key=Backup_AutoBeforeUpdate}"
|
|
IsOn="True"
|
|
Toggled="ToggleSwitchIsAutoBackupBeforeUpdate_Toggled"/>
|
|
|
|
<controls:LabeledSettingsCard x:Name="ToggleSwitchIsAutoBackupEnabled"
|
|
Header="{i18n:I18n Key=Backup_AutoPeriodic}"
|
|
IsOn="True"
|
|
Toggled="ToggleSwitchIsAutoBackupEnabled_Toggled"/>
|
|
|
|
<ui:SettingsCard Header="{i18n:I18n Key=Backup_Interval}"
|
|
Description="{i18n:I18n Key=Backup_Interval_DefaultHint}">
|
|
<ComboBox x:Name="ComboBoxAutoBackupInterval"
|
|
SelectionChanged="ComboBoxAutoBackupInterval_SelectionChanged">
|
|
<ComboBoxItem Content="{i18n:I18n Key=Backup_Interval_1Day}" Tag="1" />
|
|
<ComboBoxItem Content="{i18n:I18n Key=Backup_Interval_3Days}" Tag="3" />
|
|
<ComboBoxItem Content="{i18n:I18n Key=Backup_Interval_7Days}" Tag="7" IsSelected="True" />
|
|
<ComboBoxItem Content="{i18n:I18n Key=Backup_Interval_14Days}" Tag="14" />
|
|
<ComboBoxItem Content="{i18n:I18n Key=Backup_Interval_30Days}" Tag="30" />
|
|
</ComboBox>
|
|
</ui:SettingsCard>
|
|
|
|
<ui:SettingsCard ContentAlignment="Left">
|
|
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
|
|
<Button x:Name="BtnManualBackup" Content="{i18n:I18n Key=Backup_Manual}" Click="BtnManualBackup_Click" />
|
|
<Button x:Name="BtnRestoreBackup" Content="{i18n:I18n Key=Backup_Restore}" Click="BtnRestoreBackup_Click" />
|
|
</ikw:SimpleStackPanel>
|
|
</ui:SettingsCard>
|
|
|
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
|
Text="{i18n:I18n Key=ConfigProfiles_Title}" />
|
|
|
|
<TextBlock Text="{i18n:I18n Key=ConfigProfiles_Desc}"
|
|
Foreground="{DynamicResource TextFillColorTertiaryBrush}"
|
|
TextWrapping="Wrap" Margin="1,0,0,4" />
|
|
|
|
<ui:SettingsCard Header="{i18n:I18n Key=ConfigProfiles_Label}">
|
|
<ComboBox x:Name="ComboBoxConfigProfile" MinWidth="180"
|
|
SelectionChanged="ComboBoxConfigProfile_SelectionChanged" />
|
|
</ui:SettingsCard>
|
|
|
|
<ui:SettingsCard ContentAlignment="Left">
|
|
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
|
|
<Button x:Name="BtnDeleteConfigProfile" Content="{i18n:I18n Key=ConfigProfiles_Delete}" Click="BtnDeleteConfigProfile_Click" />
|
|
<Button x:Name="BtnSaveAsConfigProfile" Content="{i18n:I18n Key=ConfigProfiles_SaveAs}" Click="BtnSaveAsConfigProfile_Click" />
|
|
</ikw:SimpleStackPanel>
|
|
</ui:SettingsCard>
|
|
|
|
<Rectangle Height="48" />
|
|
|
|
</ikw:SimpleStackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</ui:Page>
|