Files
community/Ink Canvas/Windows/SettingsViews/Pages/AppearancePage.xaml
T
PrefacedCorg c4657ebb86 1
2026-04-26 09:12:26 +08:00

325 lines
22 KiB
XML

<ui:Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.AppearancePage"
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=Theme_GroupTitle}">
<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=Theme_Label}" />
<ui:SettingsCard Header="{i18n:I18n Key=Theme_Label}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Pinned}" />
</ui:SettingsCard.HeaderIcon>
<ComboBox x:Name="ComboBoxTheme"
SelectedIndex="0"
SelectionChanged="ComboBoxTheme_SelectionChanged">
<ComboBoxItem Content="{i18n:I18n Key=Theme_Light}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_Dark}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_System}" />
</ComboBox>
</ui:SettingsCard>
<ui:SettingsCard Header="{i18n:I18n Key=Theme_LanguageLabel}"
Description="{i18n:I18n Key=Theme_Language_RestartHint}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Globe}" />
</ui:SettingsCard.HeaderIcon>
<ComboBox x:Name="ComboBoxLanguage"
SelectedIndex="0"
SelectionChanged="ComboBoxLanguage_SelectionChanged">
<ComboBoxItem Content="{i18n:I18n Key=Theme_Language_System}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_Language_ChineseSimplified}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_Language_English}" />
</ComboBox>
</ui:SettingsCard>
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
Text="{i18n:I18n Key=Theme_EnableSplash}" />
<controls:LabeledSettingsCard x:Name="CardEnableSplashScreen"
Header="{i18n:I18n Key=Theme_EnableSplash}"
Icon="{x:Static ui:SegoeFluentIcons.Photo}"
SwitchName="ToggleSwitchEnableSplashScreen"
Toggled="ToggleSwitchEnableSplashScreen_Toggled" />
<ui:SettingsCard Header="{i18n:I18n Key=Theme_SplashStyle}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Brightness}" />
</ui:SettingsCard.HeaderIcon>
<ComboBox x:Name="ComboBoxSplashScreenStyle"
SelectedIndex="1"
SelectionChanged="ComboBoxSplashScreenStyle_SelectionChanged">
<ComboBoxItem Content="{i18n:I18n Key=Theme_Splash_Random}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_Splash_Seasonal}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_Splash_Spring}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_Splash_Summer}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_Splash_Autumn}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_Splash_Winter}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_Splash_Horse}" />
</ComboBox>
</ui:SettingsCard>
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
Text="{i18n:I18n Key=Theme_FloatingBarIcon}" />
<ui:SettingsCard Header="{i18n:I18n Key=Theme_FloatingBarIcon}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Photo}" />
</ui:SettingsCard.HeaderIcon>
<ComboBox x:Name="ComboBoxFloatingBarImg"
SelectedIndex="0"
SelectionChanged="ComboBoxFloatingBarImg_SelectionChanged">
<ComboBoxItem Content="{i18n:I18n Key=Theme_FloatingIcon_IccDefault}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_FloatingIcon_IccNoShadow}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_FloatingIcon_IccDark}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_FloatingIcon_IccDarkBreath}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_FloatingIcon_IccWhiteTransparent}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_FloatingIcon_IccBlackTransparent}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_FloatingIcon_CoolapkCrossEye}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_FloatingIcon_CoolapkAbused}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_FloatingIcon_CoolapkSmile}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_FloatingIcon_CoolapkUnderwear}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_FloatingIcon_CoolapkGreenHatDoge}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_FloatingIcon_TiebaEmoji}" />
</ComboBox>
</ui:SettingsCard>
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8" Margin="0,4,0,0">
<Button x:Name="ButtonAddCustomIcon" Content="{i18n:I18n Key=Theme_Upload}"
Click="ButtonAddCustomIcon_Click" Padding="10,3"/>
<Button x:Name="ButtonManageCustomIcons" Content="{i18n:I18n Key=Theme_Manage}"
Click="ButtonManageCustomIcons_Click" Padding="10,3"/>
</ikw:SimpleStackPanel>
<ui:SettingsCard Header="{i18n:I18n Key=Theme_FloatingBarScale}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Pinned}" />
</ui:SettingsCard.HeaderIcon>
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
<TextBlock Text="{Binding ElementName=ViewboxFloatingBarScaleTransformValueSlider, Path=Value}"
VerticalAlignment="Center" FontFamily="Consolas"/>
<Slider x:Name="ViewboxFloatingBarScaleTransformValueSlider" Minimum="0.5"
Maximum="1.25" Width="168"
IsSnapToTickEnabled="True" Value="1" TickFrequency="0.05"
TickPlacement="None" AutoToolTipPlacement="None"
ValueChanged="ViewboxFloatingBarScaleTransformValueSlider_ValueChanged" />
</ikw:SimpleStackPanel>
</ui:SettingsCard>
<ui:SettingsCard Header="{i18n:I18n Key=Theme_FloatingBarOpacity}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.EaseOfAccess}" />
</ui:SettingsCard.HeaderIcon>
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
<TextBlock Text="{Binding ElementName=ViewboxFloatingBarOpacityValueSlider, Path=Value, StringFormat={}{0:F2}}"
VerticalAlignment="Center" FontFamily="Consolas"/>
<Slider x:Name="ViewboxFloatingBarOpacityValueSlider" Minimum="0.3"
Maximum="1" Width="168"
IsSnapToTickEnabled="True" Value="1" TickFrequency="0.05"
TickPlacement="None" AutoToolTipPlacement="None"
ValueChanged="ViewboxFloatingBarOpacityValueSlider_ValueChanged" />
</ikw:SimpleStackPanel>
</ui:SettingsCard>
<ui:SettingsCard Header="{i18n:I18n Key=Theme_FloatingBarOpacityInPPT}"
Description="{i18n:I18n Key=Theme_FloatingBarOpacityInPPTHint}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Play}" />
</ui:SettingsCard.HeaderIcon>
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
<Slider x:Name="ViewboxFloatingBarOpacityInPPTValueSlider" Minimum="0.3"
Maximum="1" Width="168"
IsSnapToTickEnabled="True" Value="1" TickFrequency="0.05"
TickPlacement="None" AutoToolTipPlacement="None"
ValueChanged="ViewboxFloatingBarOpacityInPPTValueSlider_ValueChanged" />
<TextBlock Text="{Binding ElementName=ViewboxFloatingBarOpacityInPPTValueSlider, Path=Value}"
VerticalAlignment="Center" FontFamily="Consolas" Width="40" />
</ikw:SimpleStackPanel>
</ui:SettingsCard>
<controls:LabeledSettingsCard x:Name="CardEnableDisPlayNibModeToggle"
Header="{i18n:I18n Key=Theme_ShowNibButton}"
Icon="{x:Static ui:SegoeFluentIcons.TouchPointer}"
SwitchName="ToggleSwitchEnableDisPlayNibModeToggle"
Toggled="ToggleSwitchEnableDisPlayNibModeToggle_Toggled" />
<controls:LabeledSettingsCard x:Name="CardEnableViewboxBlackBoardScaleTransform"
Header="{i18n:I18n Key=Theme_BlackboardScale80}"
Icon="{x:Static ui:SegoeFluentIcons.BackToWindow}"
SwitchName="ToggleSwitchEnableViewboxBlackBoardScaleTransform"
Toggled="ToggleSwitchEnableViewboxBlackBoardScaleTransform_Toggled" />
<controls:LabeledSettingsCard x:Name="CardEnableTimeDisplayInWhiteboardMode"
Header="{i18n:I18n Key=Theme_ShowTimeInWhiteboard}"
Icon="{x:Static ui:SegoeFluentIcons.Pinned}"
SwitchName="ToggleSwitchEnableTimeDisplayInWhiteboardMode"
Toggled="ToggleSwitchEnableTimeDisplayInWhiteboardMode_Toggled" />
<controls:LabeledSettingsCard x:Name="CardEnableChickenSoupInWhiteboardMode"
Header="{i18n:I18n Key=Theme_ShowQuoteInWhiteboard}"
Icon="{x:Static ui:SegoeFluentIcons.Message}"
SwitchName="ToggleSwitchEnableChickenSoupInWhiteboardMode"
Toggled="ToggleSwitchEnableChickenSoupInWhiteboardMode_Toggled" />
<ui:SettingsCard Header="{i18n:I18n Key=Theme_QuoteSource}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Heart}" />
</ui:SettingsCard.HeaderIcon>
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
<ComboBox x:Name="ComboBoxChickenSoupSource"
Width="240"
SelectionChanged="ComboBoxChickenSoupSource_SelectionChanged">
<ComboBoxItem Content="{i18n:I18n Key=Theme_QuoteSource_OsuQuotes}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_QuoteSource_Mottos}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_QuoteSource_GaokaoBless}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_QuoteSource_Hitokoto}" />
</ComboBox>
<Button x:Name="BtnHitokotoCustomize" Content="{i18n:I18n Key=Theme_Customize}"
Padding="14,4" MinWidth="65" VerticalAlignment="Center"
Click="BtnHitokotoCustomize_Click"
Visibility="Collapsed" />
</ikw:SimpleStackPanel>
</ui:SettingsCard>
<controls:LabeledSettingsCard x:Name="CardEnableQuickPanel"
Header="{i18n:I18n Key=Theme_EnableQuickPanel}"
Icon="{x:Static ui:SegoeFluentIcons.Pinned}"
SwitchName="ToggleSwitchEnableQuickPanel"
Toggled="ToggleSwitchEnableQuickPanel_Toggled" />
<ui:SettingsCard Header="{i18n:I18n Key=Theme_UnfoldButtonIcon}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.ChevronRight}" />
</ui:SettingsCard.HeaderIcon>
<ComboBox x:Name="ComboBoxUnFoldBtnImg"
SelectedIndex="0"
SelectionChanged="ComboBoxUnFoldBtnImg_SelectionChanged">
<ComboBoxItem Content="{i18n:I18n Key=Theme_UnfoldIcon_Arrow}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_UnfoldIcon_Pen}" />
</ComboBox>
</ui:SettingsCard>
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
Text="{i18n:I18n Key=Theme_FloatingBarButtonsTitle}" />
<controls:LabeledSettingsCard x:Name="CardUseLegacyFloatingBarUI"
Header="{i18n:I18n Key=Theme_UseLegacyFloatingBarUI}"
Icon="{x:Static ui:SegoeFluentIcons.History}"
SwitchName="ToggleSwitchUseLegacyFloatingBarUI"
Toggled="ToggleSwitchUseLegacyFloatingBarUI_Toggled" />
<ui:SettingsExpander Header="{i18n:I18n Key=Theme_FloatingBarButtonsTitle}"
IsExpanded="True"
d:Visibility="Visible" d:IsExpanded="True">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.ViewAll}" />
</ui:SettingsExpander.HeaderIcon>
<ui:SettingsExpander.Items>
<ui:SettingsCard ContentAlignment="Left">
<CheckBox x:Name="CheckBoxShowShapeButton" IsChecked="True"
Content="{i18n:I18n Key=Theme_ShowShapeButton}"
Checked="CheckBoxShowShapeButton_Changed" Unchecked="CheckBoxShowShapeButton_Changed" />
</ui:SettingsCard>
<ui:SettingsCard ContentAlignment="Left">
<CheckBox x:Name="CheckBoxShowUndoButton" IsChecked="True"
Content="{i18n:I18n Key=Theme_ShowUndoButton}"
Checked="CheckBoxShowButton_Changed" Unchecked="CheckBoxShowButton_Changed" />
</ui:SettingsCard>
<ui:SettingsCard ContentAlignment="Left">
<CheckBox x:Name="CheckBoxShowRedoButton" IsChecked="True"
Content="{i18n:I18n Key=Theme_ShowRedoButton}"
Checked="CheckBoxShowButton_Changed" Unchecked="CheckBoxShowButton_Changed" />
</ui:SettingsCard>
<ui:SettingsCard ContentAlignment="Left">
<CheckBox x:Name="CheckBoxShowClearButton" IsChecked="True"
Content="{i18n:I18n Key=Theme_ShowClearButton}"
Checked="CheckBoxShowButton_Changed" Unchecked="CheckBoxShowButton_Changed" />
</ui:SettingsCard>
<ui:SettingsCard ContentAlignment="Left">
<CheckBox x:Name="CheckBoxShowWhiteboardButton" IsChecked="True"
Content="{i18n:I18n Key=Theme_ShowWhiteboardButton}"
Checked="CheckBoxShowButton_Changed" Unchecked="CheckBoxShowButton_Changed" />
</ui:SettingsCard>
<ui:SettingsCard ContentAlignment="Left">
<CheckBox x:Name="CheckBoxShowHideButton" IsChecked="True"
Content="{i18n:I18n Key=Theme_ShowHideButton}"
Checked="CheckBoxShowButton_Changed" Unchecked="CheckBoxShowButton_Changed" />
</ui:SettingsCard>
<ui:SettingsCard ContentAlignment="Left">
<CheckBox x:Name="CheckBoxShowLassoSelectButton" IsChecked="True"
Content="{i18n:I18n Key=Theme_ShowLassoButton}"
Checked="CheckBoxShowButton_Changed" Unchecked="CheckBoxShowButton_Changed" />
</ui:SettingsCard>
<ui:SettingsCard ContentAlignment="Left">
<CheckBox x:Name="CheckBoxShowClearAndMouseButton" IsChecked="True"
Content="{i18n:I18n Key=Theme_ShowClearAndMouseButton}"
Checked="CheckBoxShowButton_Changed" Unchecked="CheckBoxShowButton_Changed" />
</ui:SettingsCard>
<ui:SettingsCard ContentAlignment="Left">
<CheckBox x:Name="CheckBoxShowQuickColorPalette" IsChecked="False"
Content="{i18n:I18n Key=Theme_ShowQuickPalette}"
Checked="CheckBoxShowButton_Changed" Unchecked="CheckBoxShowButton_Changed" />
</ui:SettingsCard>
<ui:SettingsCard Header="{i18n:I18n Key=Theme_QuickPaletteMode}">
<ComboBox x:Name="ComboBoxQuickColorPaletteDisplayMode"
SelectedIndex="1"
SelectionChanged="ComboBoxQuickColorPaletteDisplayMode_SelectionChanged">
<ComboBoxItem Content="{i18n:I18n Key=Theme_QuickPalette_SingleRow}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_QuickPalette_DoubleRow}" />
</ComboBox>
</ui:SettingsCard>
<ui:SettingsCard Header="{i18n:I18n Key=Theme_EraserButtonDisplay}">
<ComboBox x:Name="ComboBoxEraserDisplayOption"
SelectedIndex="0"
SelectionChanged="ComboBoxEraserDisplayOption_SelectionChanged">
<ComboBoxItem Content="{i18n:I18n Key=Theme_EraserDisplay_Both}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_EraserDisplay_AreaOnly}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_EraserDisplay_LineOnly}" />
<ComboBoxItem Content="{i18n:I18n Key=Theme_EraserDisplay_None}" />
</ComboBox>
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
Text="{i18n:I18n Key=Tray_GroupTitle}" />
<controls:LabeledSettingsCard x:Name="CardEnableTrayIcon"
Header="{i18n:I18n Key=Tray_EnableTrayIcon}"
Icon="{x:Static ui:SegoeFluentIcons.Pin}"
SwitchName="ToggleSwitchEnableTrayIcon"
Toggled="ToggleSwitchEnableTrayIcon_Toggled" />
<Rectangle Height="48" />
</ikw:SimpleStackPanel>
</Grid>
</Grid>
</ScrollViewer>
</ui:Page>