|
|
@@ -9,144 +9,146 @@
|
|
|
xmlns:uc="clr-namespace:PicView.Avalonia.Views.UC"
|
|
|
xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels;assembly=PicView.Avalonia"
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
+ <UserControl.Resources>
|
|
|
+ <SolidColorBrush Color="{DynamicResource MainTextColor}" x:Key="CancelBrush" />
|
|
|
+ <SolidColorBrush Color="{StaticResource SecondaryTextColor}" x:Key="LinkBrush" />
|
|
|
+ </UserControl.Resources>
|
|
|
<Panel Background="{DynamicResource TertiaryBackgroundColor}" x:Name="BgPanel">
|
|
|
<uc:SpinWaiter IsVisible="False" x:Name="SpinWaiter" />
|
|
|
|
|
|
<StackPanel x:Name="ParentContainer">
|
|
|
- <StackPanel Margin="30">
|
|
|
+ <Border x:Name="MainBorder">
|
|
|
+ <StackPanel Margin="30">
|
|
|
|
|
|
- <StackPanel Margin="0,5,0,30" Orientation="Horizontal">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock
|
|
|
- Classes="txt"
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
|
- FontSize="14"
|
|
|
- Margin="4,0,0,5"
|
|
|
- Text="{CompiledBinding Translation.Width.Value,
|
|
|
- Mode=OneWay}" />
|
|
|
- <customControls:NumTextBox
|
|
|
- Background="{DynamicResource SecondaryBackgroundColor}"
|
|
|
- Classes="hover TStyle"
|
|
|
- CornerRadius="4"
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
- Height="35"
|
|
|
- Margin="0"
|
|
|
- Text="{CompiledBinding PicViewer.PixelWidth.Value,
|
|
|
- Mode=OneWay}"
|
|
|
- ToolTip.Tip="{CompiledBinding Translation.SizeTooltip.Value,
|
|
|
- Mode=OneWay}"
|
|
|
- Width="195"
|
|
|
- x:Name="PixelWidthTextBox" />
|
|
|
- </StackPanel>
|
|
|
+ <StackPanel Margin="0,5,0,30" Orientation="Horizontal">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock
|
|
|
+ Classes="txt"
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
|
+ FontSize="14"
|
|
|
+ Foreground="{StaticResource SecondaryTextColor}"
|
|
|
+ Margin="4,0,0,5"
|
|
|
+ Text="{CompiledBinding Translation.Width.Value,
|
|
|
+ Mode=OneWay}" />
|
|
|
+ <customControls:NumTextBox
|
|
|
+ Background="{DynamicResource SecondaryBackgroundColor}"
|
|
|
+ Classes="hover TStyle"
|
|
|
+ CornerRadius="4"
|
|
|
+ Foreground="{DynamicResource MainTextColor}"
|
|
|
+ Height="35"
|
|
|
+ Margin="0"
|
|
|
+ Text="{CompiledBinding PicViewer.PixelWidth.Value,
|
|
|
+ Mode=OneWay}"
|
|
|
+ ToolTip.Tip="{CompiledBinding Translation.SizeTooltip.Value,
|
|
|
+ Mode=OneWay}"
|
|
|
+ Width="195"
|
|
|
+ x:Name="PixelWidthTextBox" />
|
|
|
+ </StackPanel>
|
|
|
|
|
|
- <Button
|
|
|
- Background="Transparent"
|
|
|
- Classes="altHover"
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
- Height="35"
|
|
|
- Margin="5,20,5,0"
|
|
|
- Width="38"
|
|
|
- x:Name="LinkChainButton">
|
|
|
- <Panel>
|
|
|
- <Image
|
|
|
- Height="21"
|
|
|
- Source="{StaticResource LinkChainImage}"
|
|
|
- Width="21"
|
|
|
- x:Name="LinkChainImage" />
|
|
|
- <Image
|
|
|
- Height="21"
|
|
|
- IsVisible="False"
|
|
|
- Source="{StaticResource UnlinkChainImage}"
|
|
|
- Width="21"
|
|
|
- x:Name="UnlinkChainImage" />
|
|
|
- </Panel>
|
|
|
- </Button>
|
|
|
+ <customControls:IconButton
|
|
|
+ Background="Transparent"
|
|
|
+ Classes="altHover"
|
|
|
+ Foreground="{StaticResource LinkBrush}"
|
|
|
+ Height="35"
|
|
|
+ Icon="{StaticResource LinkChainImage}"
|
|
|
+ IconHeight="21"
|
|
|
+ IconWidth="21"
|
|
|
+ Margin="5,20,5,0"
|
|
|
+ Width="38"
|
|
|
+ x:Name="LinkChainButton" />
|
|
|
|
|
|
|
|
|
- <StackPanel>
|
|
|
- <TextBlock
|
|
|
- Classes="txt"
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
|
- FontSize="14"
|
|
|
- Margin="4,0,0,5"
|
|
|
- Text="{CompiledBinding Translation.Height.Value,
|
|
|
- Mode=OneWay}" />
|
|
|
- <customControls:NumTextBox
|
|
|
- Background="{DynamicResource SecondaryBackgroundColor}"
|
|
|
- Classes="hover TStyle"
|
|
|
- CornerRadius="4"
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
- Height="35"
|
|
|
- Margin="0"
|
|
|
- Text="{CompiledBinding PicViewer.PixelHeight.Value,
|
|
|
- Mode=OneWay}"
|
|
|
- ToolTip.Tip="{CompiledBinding Translation.SizeTooltip,
|
|
|
- Mode=OneWay}"
|
|
|
- Width="195"
|
|
|
- x:Name="PixelHeightTextBox" />
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock
|
|
|
+ Classes="txt"
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
|
+ FontSize="14"
|
|
|
+ Foreground="{StaticResource SecondaryTextColor}"
|
|
|
+ Margin="4,0,0,5"
|
|
|
+ Text="{CompiledBinding Translation.Height.Value,
|
|
|
+ Mode=OneWay}" />
|
|
|
+ <customControls:NumTextBox
|
|
|
+ Background="{DynamicResource SecondaryBackgroundColor}"
|
|
|
+ Classes="hover TStyle"
|
|
|
+ CornerRadius="4"
|
|
|
+ Foreground="{DynamicResource MainTextColor}"
|
|
|
+ Height="35"
|
|
|
+ Margin="0"
|
|
|
+ Text="{CompiledBinding PicViewer.PixelHeight.Value,
|
|
|
+ Mode=OneWay}"
|
|
|
+ ToolTip.Tip="{CompiledBinding Translation.SizeTooltip,
|
|
|
+ Mode=OneWay}"
|
|
|
+ Width="195"
|
|
|
+ x:Name="PixelHeightTextBox" />
|
|
|
+ </StackPanel>
|
|
|
</StackPanel>
|
|
|
- </StackPanel>
|
|
|
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock
|
|
|
- Classes="txt"
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
|
- FontSize="14"
|
|
|
- Margin="5,0,0,2"
|
|
|
- Text="{CompiledBinding Translation.Quality.Value,
|
|
|
- Mode=OneWay}" />
|
|
|
- <customControls:CustomSlider
|
|
|
- IsSnapToTickEnabled="True"
|
|
|
- Margin="5,0,0,2"
|
|
|
- Maximum="100"
|
|
|
- Minimum="1"
|
|
|
- TickFrequency="1"
|
|
|
- Value="90"
|
|
|
- Width="190"
|
|
|
- x:Name="QualitySlider" />
|
|
|
- <TextBlock
|
|
|
- Classes="txt"
|
|
|
- Margin="8,0,0,3"
|
|
|
- Text="{Binding Path=Value, ElementName=QualitySlider}" />
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Margin="48,0,0,0">
|
|
|
- <TextBlock
|
|
|
- Classes="txt"
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
|
- FontSize="14"
|
|
|
- Margin="5,0,0,5"
|
|
|
- Text="{CompiledBinding Translation.ConvertTo.Value,
|
|
|
- Mode=OneWay}" />
|
|
|
- <ComboBox
|
|
|
- Background="{DynamicResource SecondaryBackgroundColor}"
|
|
|
- BorderBrush="{DynamicResource MainBorderColor}"
|
|
|
- BorderThickness="1"
|
|
|
- CornerRadius="4"
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
|
- Height="30"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Margin="0"
|
|
|
- Padding="5,7,0,7"
|
|
|
- SelectedIndex="0"
|
|
|
- Width="195"
|
|
|
- x:Name="ConversionComboBox">
|
|
|
- <ComboBoxItem Content="{CompiledBinding Translation.NoConversion.Value, Mode=OneWay}" x:Name="NoConversion" />
|
|
|
- <ComboBoxItem Content=".png" x:Name="PngItem" />
|
|
|
- <ComboBoxItem Content=".jpg" x:Name="JpgItem" />
|
|
|
- <ComboBoxItem Content=".webp" x:Name="WebpItem" />
|
|
|
- <ComboBoxItem Content=".avif" x:Name="AvifItem" />
|
|
|
- <ComboBoxItem Content=".heic" x:Name="HeicItem" />
|
|
|
- <ComboBoxItem Content=".jxl" x:Name="JxlItem" />
|
|
|
- </ComboBox>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock
|
|
|
+ Classes="txt"
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
|
+ FontSize="14"
|
|
|
+ Foreground="{StaticResource SecondaryTextColor}"
|
|
|
+ Margin="5,0,0,2"
|
|
|
+ Text="{CompiledBinding Translation.Quality.Value,
|
|
|
+ Mode=OneWay}" />
|
|
|
+ <customControls:CustomSlider
|
|
|
+ IsSnapToTickEnabled="True"
|
|
|
+ Margin="5,0,0,2"
|
|
|
+ Maximum="100"
|
|
|
+ Minimum="1"
|
|
|
+ TickFrequency="1"
|
|
|
+ Value="90"
|
|
|
+ Width="190"
|
|
|
+ x:Name="QualitySlider" />
|
|
|
+ <TextBlock
|
|
|
+ Classes="txt"
|
|
|
+ Foreground="{StaticResource SecondaryTextColor}"
|
|
|
+ Margin="8,0,0,3"
|
|
|
+ Text="{Binding Path=Value, ElementName=QualitySlider}" />
|
|
|
+ </StackPanel>
|
|
|
+ <StackPanel Margin="48,0,0,0">
|
|
|
+ <TextBlock
|
|
|
+ Classes="txt"
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
|
+ FontSize="14"
|
|
|
+ Foreground="{StaticResource SecondaryTextColor}"
|
|
|
+ Margin="5,0,0,5"
|
|
|
+ Text="{CompiledBinding Translation.ConvertTo.Value,
|
|
|
+ Mode=OneWay}" />
|
|
|
+ <ComboBox
|
|
|
+ Background="{DynamicResource SecondaryBackgroundColor}"
|
|
|
+ BorderBrush="{DynamicResource MainBorderColor}"
|
|
|
+ BorderThickness="1"
|
|
|
+ CornerRadius="4"
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
|
+ Foreground="{DynamicResource MainTextColor}"
|
|
|
+ Height="30"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Margin="0"
|
|
|
+ Padding="5,7,0,7"
|
|
|
+ SelectedIndex="0"
|
|
|
+ Width="195"
|
|
|
+ x:Name="ConversionComboBox">
|
|
|
+ <ComboBoxItem Content="{CompiledBinding Translation.NoConversion.Value, Mode=OneWay}" x:Name="NoConversion" />
|
|
|
+ <ComboBoxItem Content=".png" x:Name="PngItem" />
|
|
|
+ <ComboBoxItem Content=".jpg" x:Name="JpgItem" />
|
|
|
+ <ComboBoxItem Content=".webp" x:Name="WebpItem" />
|
|
|
+ <ComboBoxItem Content=".avif" x:Name="AvifItem" />
|
|
|
+ <ComboBoxItem Content=".heic" x:Name="HeicItem" />
|
|
|
+ <ComboBoxItem Content=".jxl" x:Name="JxlItem" />
|
|
|
+ </ComboBox>
|
|
|
+ </StackPanel>
|
|
|
</StackPanel>
|
|
|
</StackPanel>
|
|
|
+ </Border>
|
|
|
|
|
|
- </StackPanel>
|
|
|
<StackPanel
|
|
|
Background="#277A7A7A"
|
|
|
Height="80"
|
|
|
- Orientation="Horizontal">
|
|
|
+ Orientation="Horizontal"
|
|
|
+ x:Name="BottomBorder">
|
|
|
<Button
|
|
|
Classes="BorderStyle altHover mainBtn"
|
|
|
CornerRadius="4"
|
|
|
@@ -169,6 +171,7 @@
|
|
|
x:Name="CancelButton">
|
|
|
<TextBlock
|
|
|
Classes="txt"
|
|
|
+ Foreground="{StaticResource CancelBrush}"
|
|
|
Text="{CompiledBinding Translation.Cancel.Value,
|
|
|
Mode=OneWay}"
|
|
|
TextAlignment="Center" />
|
|
|
@@ -178,26 +181,25 @@
|
|
|
Background="{DynamicResource AccentColor}"
|
|
|
Classes="BorderStyle accentHover mainBtn"
|
|
|
CornerRadius="4"
|
|
|
+ Padding="8"
|
|
|
Width="195"
|
|
|
x:Name="SaveButton">
|
|
|
<TextBlock
|
|
|
Classes="txt"
|
|
|
+ Foreground="{StaticResource SecondaryTextColor}"
|
|
|
Text="{CompiledBinding Translation.Save.Value,
|
|
|
Mode=OneWay}"
|
|
|
TextAlignment="Center" />
|
|
|
<SplitButton.Flyout>
|
|
|
<MenuFlyout FlyoutPresenterClasses="noCornerRadius" Placement="Bottom">
|
|
|
- <Button
|
|
|
+ <MenuItem
|
|
|
Background="Transparent"
|
|
|
- Width="130"
|
|
|
- x:Name="SaveAsButton">
|
|
|
- <TextBlock
|
|
|
- Classes="txt"
|
|
|
- Foreground="{DynamicResource MainTextColor}"
|
|
|
- Text="{CompiledBinding Translation.SaveAs.Value,
|
|
|
- Mode=OneWay}"
|
|
|
- TextAlignment="Center" />
|
|
|
- </Button>
|
|
|
+ Header="{CompiledBinding Translation.SaveAs.Value,
|
|
|
+ Mode=OneWay}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ Padding="0,6,24,6"
|
|
|
+ Width="195"
|
|
|
+ x:Name="SaveAsButton" />
|
|
|
</MenuFlyout>
|
|
|
</SplitButton.Flyout>
|
|
|
</SplitButton>
|