|
@@ -0,0 +1,290 @@
|
|
|
+<Window
|
|
|
+ xmlns="https://github.com/avaloniaui"
|
|
|
+ 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"
|
|
|
+ xmlns:cmds="clr-namespace:PixiEditor.AvaloniaUI.Models.Commands.XAML"
|
|
|
+ xmlns:ui="clr-namespace:PixiEditor.Extensions.UI;assembly=PixiEditor.Extensions"
|
|
|
+ xmlns:input="clr-namespace:PixiEditor.AvaloniaUI.Views.Input"
|
|
|
+ xmlns:sys="clr-namespace:System;assembly=System.Runtime"
|
|
|
+ xmlns:converters="clr-namespace:PixiEditor.AvaloniaUI.Helpers.Converters"
|
|
|
+ xmlns:vm="clr-namespace:PixiEditor.AvaloniaUI.ViewModels"
|
|
|
+ xmlns:ui1="clr-namespace:PixiEditor.AvaloniaUI.Helpers.UI"
|
|
|
+ xmlns:behaviours="clr-namespace:PixiEditor.AvaloniaUI.Helpers.Behaviours"
|
|
|
+ xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
|
|
|
+ xmlns:markupExtensions="clr-namespace:PixiEditor.AvaloniaUI.Helpers.MarkupExtensions"
|
|
|
+ xmlns:preferences="clr-namespace:PixiEditor.AvaloniaUI.Models.Preferences"
|
|
|
+ xmlns:dialogs="clr-namespace:PixiEditor.AvaloniaUI.Views.Dialogs"
|
|
|
+ mc:Ignorable="d"
|
|
|
+ x:Class="PixiEditor.AvaloniaUI.Views.Windows.SettingsWindow"
|
|
|
+ Name="window"
|
|
|
+ d:DesignWidth="780" d:DesignHeight="688"
|
|
|
+ Width="780" Height="688"
|
|
|
+ MinWidth="665" MinHeight="500"
|
|
|
+ DataContext="{DynamicResource SettingsWindowViewModel}"
|
|
|
+ WindowStartupLocation="CenterScreen"
|
|
|
+ BorderBrush="Black" BorderThickness="1"
|
|
|
+ Background="{DynamicResource AccentColor}"
|
|
|
+ FlowDirection="{markupExtensions:Localization FlowDirection}"
|
|
|
+ ui:Translator.Key="SETTINGS">
|
|
|
+
|
|
|
+ <Window.Resources>
|
|
|
+ <vm:SettingsWindowViewModel x:Key="SettingsWindowViewModel"/>
|
|
|
+ </Window.Resources>
|
|
|
+
|
|
|
+ <!-- TODO
|
|
|
+ <WindowChrome.WindowChrome>
|
|
|
+ <WindowChrome CaptionHeight="32" GlassFrameThickness="0.1"
|
|
|
+ ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
|
|
+ </WindowChrome.WindowChrome>
|
|
|
+
|
|
|
+ <Window.CommandBindings>
|
|
|
+ <CommandBinding Command="{x:Static SystemCommands.CloseWindowCommand}" CanExecute="CommandBinding_CanExecute"
|
|
|
+ Executed="CommandBinding_Executed_Close" />
|
|
|
+ </Window.CommandBindings>
|
|
|
+ -->
|
|
|
+
|
|
|
+ <DockPanel Focusable="True" Background="{DynamicResource ThemeBackgroundBrush1}">
|
|
|
+ <!--Background="{StaticResource MainColor}"-->
|
|
|
+ <i:Interaction.Behaviors>
|
|
|
+ <behaviours:ClearFocusOnClickBehavior/>
|
|
|
+ </i:Interaction.Behaviors>
|
|
|
+
|
|
|
+ <dialogs:DialogTitleBar DockPanel.Dock="Top"
|
|
|
+ TitleKey="SETTINGS" CloseCommand="{x:Static vm:SystemCommands.CloseWindowCommand}"/>
|
|
|
+
|
|
|
+ <ListBox DockPanel.Dock="Left" x:Name="pages" ItemsSource="{Binding Pages}"
|
|
|
+ Background="Transparent" BorderThickness="0" MinWidth="165"
|
|
|
+ SelectedIndex="{Binding CurrentPage}">
|
|
|
+ <!--ItemContainerStyle="{StaticResource PixiListBoxItemStyle}"-->
|
|
|
+ <!--Width="Auto"-->
|
|
|
+ <ListBox.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Margin="10 5 10 5" FontSize="15" Foreground="White" Text="{Binding Path=Name.Value}"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </ListBox.ItemTemplate>
|
|
|
+ </ListBox>
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <!--Background="{StaticResource AccentColor}"-->
|
|
|
+ <StackPanel Orientation="Vertical" Margin="15,10" Tag="27">
|
|
|
+ <StackPanel.IsVisible>
|
|
|
+ <Binding Path="CurrentPage" Converter="{converters:IsEqualConverter}">
|
|
|
+ <Binding.ConverterParameter><sys:Int32>0</sys:Int32></Binding.ConverterParameter>
|
|
|
+ </Binding>
|
|
|
+ </StackPanel.IsVisible>
|
|
|
+ <Label ui:Translator.Key="LANGUAGE"/>
|
|
|
+ <!-- Style="{StaticResource SettingsHeader}"-->
|
|
|
+ <ComboBox Margin="27 5" Width="200" Height="25" FontSize="12" HorizontalAlignment="Left"
|
|
|
+ ItemsSource="{Binding SettingsSubViewModel.General.AvailableLanguages}"
|
|
|
+ SelectedItem="{Binding SettingsSubViewModel.General.SelectedLanguage, Mode=TwoWay}">
|
|
|
+ <ComboBox.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <Image VerticalAlignment="Center" Margin="5 0" Source="{Binding IconFullPath}"/>
|
|
|
+ <TextBlock VerticalAlignment="Center" Text="{Binding Name}"/>
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </ComboBox.ItemTemplate>
|
|
|
+ <!--<ComboBox.ItemContainerStyle>
|
|
|
+ <Style TargetType="{x:Type ComboBoxItem}">
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="{x:Type ComboBoxItem}">
|
|
|
+ <Border Height="25" Margin="0" Padding="5,0" BorderThickness="0,1">
|
|
|
+ <ContentPresenter/>
|
|
|
+ <Border.Style>
|
|
|
+ <Style TargetType="{x:Type Border}">
|
|
|
+ <Style.Triggers>
|
|
|
+ <Trigger Property="IsMouseOver" Value="False">
|
|
|
+ <Setter Property="Background" Value="Transparent"/>
|
|
|
+ <Setter Property="BorderBrush" Value="Transparent"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
+ <Setter Property="Background" Value="{StaticResource MainColor}"/>
|
|
|
+ <Setter Property="BorderBrush" Value="{StaticResource AlmostLightModeAccentColor}"/>
|
|
|
+ </Trigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </Border.Style>
|
|
|
+ </Border>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ </ComboBox.ItemContainerStyle>-->
|
|
|
+ </ComboBox>
|
|
|
+
|
|
|
+ <Label ui:Translator.Key="MISC" d:Content="Misc"/> <!--Styles="{StaticResource SettingsHeader}"-->
|
|
|
+
|
|
|
+ <CheckBox Margin="27 0"
|
|
|
+ VerticalAlignment="Center" ui:Translator.Key="SHOW_STARTUP_WINDOW" d:Content="Show startup window"
|
|
|
+ IsChecked="{Binding SettingsSubViewModel.File.ShowStartupWindow}"/>
|
|
|
+
|
|
|
+ <CheckBox Margin="27 10"
|
|
|
+ VerticalAlignment="Center" ui:Translator.Key="DISABLE_NEWS_PANEL" d:Content="Hide news in startup window"
|
|
|
+ IsChecked="{Binding SettingsSubViewModel.File.DisableNewsPanel}"/>
|
|
|
+
|
|
|
+ <CheckBox Margin="27 0"
|
|
|
+ VerticalAlignment="Center" d:Content="Show image preview in taskbar" ui:Translator.Key="SHOW_IMAGE_PREVIEW_TASKBAR"
|
|
|
+ IsChecked="{Binding SettingsSubViewModel.General.ImagePreviewInTaskbar}"/>
|
|
|
+
|
|
|
+ <StackPanel Margin="27 10 27 0" Orientation="Horizontal">
|
|
|
+ <Label
|
|
|
+ ui:Translator.Key="RECENT_FILE_LENGTH"
|
|
|
+ ui:Translator.TooltipKey="RECENT_FILE_LENGTH_TOOLTIP"/>
|
|
|
+ <!--Styles="{StaticResource SettingsText}"-->
|
|
|
+ <input:NumberInput Margin="10 0 0 0"
|
|
|
+ Min="0" FontSize="12" HorizontalAlignment="Left"
|
|
|
+ Value="{Binding SettingsSubViewModel.File.MaxOpenedRecently, Mode=TwoWay}" Height="19" Width="40"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <Label
|
|
|
+ d:Content="Default new file size"
|
|
|
+ ui:Translator.Key="DEFAULT_NEW_SIZE"/>
|
|
|
+ <!--Styles="{StaticResource SettingsHeader}"-->
|
|
|
+
|
|
|
+ <StackPanel Orientation="Horizontal" Margin="27 5">
|
|
|
+ <Label d:Content="Width" ui:Translator.Key="WIDTH"/>
|
|
|
+ <!--Styles="{StaticResource SettingsText}"-->
|
|
|
+ <input:SizeInput Margin="10 0 0 0"
|
|
|
+ Size="{Binding SettingsSubViewModel.File.DefaultNewFileWidth, Mode=TwoWay}"
|
|
|
+ Height="21" MaxSize="9999" HorizontalAlignment="Left"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <StackPanel Orientation="Horizontal" Margin="27 5">
|
|
|
+ <Label d:Content="Height" ui:Translator.Key="HEIGHT"/>
|
|
|
+ <!--Styles="{StaticResource SettingsText}"-->
|
|
|
+ <input:SizeInput Margin="7 0 0 0"
|
|
|
+ Size="{Binding SettingsSubViewModel.File.DefaultNewFileHeight, Mode=TwoWay}"
|
|
|
+ Height="21" MaxSize="9999" HorizontalAlignment="Left"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <Label d:Content="Tools" ui:Translator.Key="TOOLS"/>
|
|
|
+ <!--Styles="{StaticResource SettingsHeader}"-->
|
|
|
+
|
|
|
+ <StackPanel Margin="27 0" Orientation="Horizontal">
|
|
|
+ <Label Margin="0,0,7,0"
|
|
|
+ ui:Translator.Key="RIGHT_CLICK_MODE"/>
|
|
|
+ <!--Styles="{StaticResource SettingsText}"-->
|
|
|
+ <ComboBox SelectedItem="{Binding RightClickMode, Source={vm:MainVM ToolsSVM}, Mode=TwoWay}"
|
|
|
+ ItemsSource="{markupExtensions:Enum preferences:RightClickMode}"
|
|
|
+ Width="160"/>
|
|
|
+ <!--Styles="{StaticResource TranslatedEnum}"-->
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <CheckBox VerticalAlignment="Center" Margin="27 5"
|
|
|
+ IsChecked="{Binding SettingsSubViewModel.Tools.EnableSharedToolbar}" d:Content="Enable shared toolbar" ui:Translator.Key="ENABLE_SHARED_TOOLBAR"/>
|
|
|
+
|
|
|
+ <Label d:Content="Automatic updates" ui:Translator.Key="AUTOMATIC_UPDATES"/>
|
|
|
+ <!--Styles="{StaticResource SettingsHeader}"-->
|
|
|
+
|
|
|
+ <CheckBox Margin="27 5" VerticalAlignment="Center" IsEnabled="{Binding Path=ShowUpdateTab}"
|
|
|
+ IsChecked="{Binding SettingsSubViewModel.Update.CheckUpdatesOnStartup}" ui:Translator.Key="CHECK_FOR_UPDATES" d:Content="Check updates on startup"/>
|
|
|
+
|
|
|
+ <StackPanel Orientation="Horizontal" Margin="27 5">
|
|
|
+ <Label Grid.Row="11" Grid.Column="1" d:Content="Update stream" ui:Translator.Key="UPDATE_STREAM"/>
|
|
|
+ <!--Styles="{StaticResource SettingsText}"-->
|
|
|
+ <StackPanel Margin="5 0" Orientation="Horizontal" VerticalAlignment="Center"
|
|
|
+ Height="21.96" HorizontalAlignment="Left">
|
|
|
+ <ComboBox Width="110" IsEnabled="{Binding Path=ShowUpdateTab}"
|
|
|
+ ItemsSource="{Binding SettingsSubViewModel.Update.UpdateChannels}"
|
|
|
+ SelectedValue="{Binding SettingsSubViewModel.Update.UpdateChannelName}"/>
|
|
|
+ <Image Cursor="Help" Margin="10 0 0 0" Source="/Images/Commands/PixiEditor/Links/OpenDocumentation.png"
|
|
|
+ IsVisible="{Binding !ShowUpdateTab}"
|
|
|
+ ui:Translator.TooltipKey="UPDATE_CHANNEL_HELP_TOOLTIP"/>
|
|
|
+ <!-- ToolTipService.InitialShowDelay="0"-->
|
|
|
+ </StackPanel>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <Label d:Content="Debug" ui:Translator.Key="DEBUG"/>
|
|
|
+ <!--Styles="{StaticResource SettingsHeader}"-->
|
|
|
+ <CheckBox Margin="27 5" VerticalAlignment="Center"
|
|
|
+ IsChecked="{Binding SettingsSubViewModel.General.IsDebugModeEnabled}" ui:Translator.Key="ENABLE_DEBUG_MODE" d:Content="Enable Debug Mode"/>
|
|
|
+ <!--<Label Margin="0 5" Styles="{StaticResource SettingsText}" VerticalAlignment="Center">
|
|
|
+ <ui1:Hyperlink Command="{cmds:Command PixiEditor.Debug.OpenCrashReportsDirectory}" Style="{StaticResource SettingsLink}">
|
|
|
+ <Run ui:Translator.Key="OPEN_CRASH_REPORTS_DIR" d:Text="Open crash reports directory"/>
|
|
|
+ <Run Text="" FontFamily="{StaticResource Feather}"/>
|
|
|
+ </ui1:Hyperlink>
|
|
|
+ </Label>-->
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <StackPanel Margin="15,10">
|
|
|
+ <StackPanel.IsVisible>
|
|
|
+ <Binding Path="CurrentPage" Converter="{converters:IsEqualConverter}">
|
|
|
+ <Binding.ConverterParameter>
|
|
|
+ <sys:Int32>1</sys:Int32>
|
|
|
+ </Binding.ConverterParameter>
|
|
|
+ </Binding>
|
|
|
+ </StackPanel.IsVisible>
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <Label d:Content="Rich Presence" ui:Translator.Key="DISCORD_RICH_PRESENCE"/>
|
|
|
+ <!--Styles="{StaticResource SettingsHeader}"-->
|
|
|
+
|
|
|
+ <CheckBox Margin="27 5" VerticalAlignment="Center"
|
|
|
+ IsChecked="{Binding SettingsSubViewModel.Discord.EnableRichPresence}" d:Content="Enabled" ui:Translator.Key="ENABLED"/>
|
|
|
+ <CheckBox Margin="27 5" VerticalAlignment="Center"
|
|
|
+ IsEnabled="{Binding SettingsSubViewModel.Discord.EnableRichPresence}"
|
|
|
+ IsChecked="{Binding SettingsSubViewModel.Discord.ShowDocumentName}" d:Content="Show image name" ui:Translator.Key="SHOW_IMAGE_NAME"/>
|
|
|
+ <CheckBox Margin="27 5" VerticalAlignment="Center"
|
|
|
+ IsEnabled="{Binding SettingsSubViewModel.Discord.EnableRichPresence}" d:Content="Show image size" ui:Translator.Key="SHOW_IMAGE_SIZE"
|
|
|
+ IsChecked="{Binding SettingsSubViewModel.Discord.ShowDocumentSize}"/>
|
|
|
+ <CheckBox Margin="27 5" VerticalAlignment="Center"
|
|
|
+ IsEnabled="{Binding SettingsSubViewModel.Discord.EnableRichPresence}" ui:Translator.Key="SHOW_LAYER_COUNT" d:Content="Show layer count"
|
|
|
+ IsChecked="{Binding SettingsSubViewModel.Discord.ShowLayerCount}"/>
|
|
|
+ </StackPanel>
|
|
|
+ <!--<usercontrols:DiscordRPPreview
|
|
|
+ Margin="15"
|
|
|
+ Width="280"
|
|
|
+ State="{Binding SettingsSubViewModel.Discord.StatePreview}"
|
|
|
+ Detail="{Binding SettingsSubViewModel.Discord.DetailPreview}"
|
|
|
+ IsPlaying="{Binding SettingsSubViewModel.Discord.EnableRichPresence}"/>-->
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <Grid Height="{Binding ElementName=window, Path=Height, Converter={converters:SubtractConverter}, ConverterParameter=50}"
|
|
|
+ Margin="10,10,10,50">
|
|
|
+ <Grid.IsVisible>
|
|
|
+ <Binding Path="CurrentPage" Converter="{converters:IsEqualConverter}">
|
|
|
+ <Binding.ConverterParameter>
|
|
|
+ <sys:Int32>2</sys:Int32>
|
|
|
+ </Binding.ConverterParameter>
|
|
|
+ </Binding>
|
|
|
+ </Grid.IsVisible>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto"/>
|
|
|
+ <RowDefinition Height="Auto"/>
|
|
|
+ <RowDefinition/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
|
|
+ <!--<StackPanel.Resources>
|
|
|
+ <Style TargetType="Button" BasedOn="{StaticResource DarkRoundButton}">
|
|
|
+ <Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
|
+ <Setter Property="MinWidth" Value="115"/>
|
|
|
+ <Setter Property="Height" Value="Auto"/>
|
|
|
+ <Setter Property="Margin" Value="5,0"/>
|
|
|
+ <Setter Property="FontSize" Value="12"/>
|
|
|
+ <Setter Property="Padding" Value="5"/>
|
|
|
+ </Style>
|
|
|
+ </StackPanel.Resources>-->
|
|
|
+ <Button Command="{cmds:Command PixiEditor.Shortcuts.Export}"
|
|
|
+ d:Content="Export" ui:Translator.Key="EXPORT"/>
|
|
|
+ <Button Command="{cmds:Command PixiEditor.Shortcuts.Import}"
|
|
|
+ d:Content="Import" ui:Translator.Key="IMPORT"/>
|
|
|
+ <Button Command="{cmds:Command PixiEditor.Shortcuts.OpenTemplatePopup}"
|
|
|
+ d:Content="Shortcut Templates" ui:Translator.Key="SHORTCUT_TEMPLATES"/>
|
|
|
+ <Button Command="{cmds:Command PixiEditor.Shortcuts.Reset}"
|
|
|
+ d:Content="Reset all" ui:Translator.Key="RESET_ALL"/>
|
|
|
+ </StackPanel>
|
|
|
+ <TextBox Grid.Row="1" Margin="0,10"
|
|
|
+ Text="{Binding SearchTerm, Mode=TwoWay}">
|
|
|
+ <!--Styles="{StaticResource DarkTextBoxStyle}"-->
|
|
|
+ <i:Interaction.Behaviors>
|
|
|
+ <behaviours:GlobalShortcutFocusBehavior/>
|
|
|
+ </i:Interaction.Behaviors>
|
|
|
+ </TextBox>
|
|
|
+
|
|
|
+ <!--<settingGroups:ShortcutsBinder Grid.Row="2"/>-->
|
|
|
+ </Grid>
|
|
|
+ </StackPanel>
|
|
|
+ </DockPanel>
|
|
|
+
|
|
|
+</Window>
|