<UserControl
    x:Class="PicView.Views.UserControls.QuickSettingsMenu"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:uc="clr-namespace:PicView.Views.UserControls"
    Foreground="{StaticResource MainColorBrush}"
    ToolTip="{StaticResource ShowImageInfo}"
    Canvas.ZIndex="3">
    <StackPanel>
        <Border
            Width="358"
            Height="230"
            Background="{StaticResource NoisyBg}"
            BorderBrush="{StaticResource BorderBrush}"
            BorderThickness="1"
            Effect="{StaticResource MenuShadow}">

            <Canvas VerticalAlignment="Top">
                <Canvas.Effect>
                    <DropShadowEffect
                        BlurRadius="1"
                        Direction="265"
                        ShadowDepth="1"
                        Color="{StaticResource AltInterface}" />
                </Canvas.Effect>

                <Rectangle
                    Canvas.Top="1"
                    Width="356"
                    Height="49"
                    Fill="{StaticResource BackgroundColorBrushAlt}" />

                <uc:SettingsButton x:Name="SettingsButton" Width="110" />

                <Rectangle
                    Canvas.Left="109"
                    Canvas.Top="-1"
                    Width="1"
                    Height="51"
                    Panel.ZIndex="1"
                    Stroke="{StaticResource BorderBrush}"
                    StrokeThickness="1" />

                <uc:InfoButton 
                    x:Name="InfoButton"
                    Canvas.Left="110"
                    Width="91" />

                <uc:ImageInfoButton 
                    x:Name="ImageInfoButton"
                    Canvas.Left="202"
                    Width="50" />

                <Rectangle
                    Canvas.Left="201"
                    Canvas.Top="-1"
                    Width="1"
                    Height="51"
                    Panel.ZIndex="1"
                    Stroke="{StaticResource BorderBrush}"
                    StrokeThickness="1" />

                <uc:ResizeButton x:Name="QuickResize" Canvas.Left="253" />

                <Rectangle
                    Canvas.Left="252"
                    Canvas.Top="-1"
                    Width="1"
                    Height="51"
                    Panel.ZIndex="1"
                    Stroke="{StaticResource BorderBrush}"
                    StrokeThickness="1" />

                <uc:MenuCloseButton
                    x:Name="CloseButton"
                    Canvas.Left="305"
                    ToolTip="Close" />

                <Rectangle
                    Canvas.Top="50"
                    Width="356"
                    Panel.ZIndex="1"
                    Stroke="{StaticResource BorderBrush}"
                    StrokeThickness="1" />

                <Border
                    x:Name="RotateLeftButtonBorder"
                    Canvas.Left="6"
                    Canvas.Top="57"
                    Width="51"
                    Height="51"
                    Style="{StaticResource ButtonBorder}">
                    <uc:RotateLeftButton x:Name="RotateLeftButton" />
                </Border>

                <Border
                    x:Name="RotateRightButtonBorder"
                    Canvas.Left="64"
                    Canvas.Top="57"
                    Width="51"
                    Height="51"
                    Style="{StaticResource ButtonBorder}">
                    <uc:RotateRightButton x:Name="RotaRighttButton" />
                </Border>

                <Border
                    x:Name="FlipButtonBorder"
                    Canvas.Left="122"
                    Canvas.Top="57"
                    Width="51"
                    Height="51"
                    Style="{StaticResource ButtonBorder}">
                    <uc:FlipButton x:Name="FlipButton" />
                </Border>

                <Border
                    x:Name="CropButtonBorder"
                    Canvas.Left="184"
                    Canvas.Top="57"
                    Width="51"
                    Height="51"
                    Style="{StaticResource ButtonBorder}"
                    ToolTip="{StaticResource Crop}">
                    <Button x:Name="CropButton" FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto SemiBold">
                        <Button.Background>
                            <SolidColorBrush x:Name="CropButtonBrush" Color="Transparent" />
                        </Button.Background>
                        <Path
                            Width="17"
                            Height="17"
                            Data="M488 352h-40V109.25l59.31-59.31c6.25-6.25 6.25-16.38 0-22.63L484.69 4.69c-6.25-6.25-16.38-6.25-22.63 0L402.75 64H192v96h114.75L160 306.75V24c0-13.26-10.75-24-24-24H88C74.75 0 64 10.74 64 24v40H24C10.75 64 0 74.74 0 88v48c0 13.25 10.75 24 24 24h40v264c0 13.25 10.75 24 24 24h232v-96H205.25L352 205.25V488c0 13.25 10.75 24 24 24h48c13.25 0 24-10.75 24-24v-40h40c13.25 0 24-10.75 24-24v-48c0-13.26-10.75-24-24-24z"
                            Stretch="Fill">
                            <Path.Fill>
                                <SolidColorBrush x:Name="CropFill" Color="{StaticResource IconColor}" />
                            </Path.Fill>
                        </Path>
                    </Button>
                </Border>

                <Border
                    x:Name="ResizeBorder"
                    Canvas.Left="242"
                    Canvas.Top="57"
                    Width="51"
                    Height="51"
                    Style="{StaticResource ButtonBorder}">
                    <uc:BackGroundButton x:Name="BackgroundButton" />
                </Border>

                <Border
                    x:Name="OptimizeBorder"
                    Canvas.Left="299.5"
                    Canvas.Top="57"
                    Width="51"
                    Height="51"
                    Style="{StaticResource ButtonBorder}">
                    <uc:OptimizeButton x:Name="OptimizeButton" />
                </Border>

                <Rectangle
                    Canvas.Left="304"
                    Canvas.Top="0"
                    Width="1"
                    Height="50"
                    Panel.ZIndex="1"
                    Stroke="{StaticResource BorderBrush}"
                    StrokeThickness="1" />

                <Border
                    x:Name="SetFitBorder"
                    Canvas.Left="6"
                    Canvas.Top="114"
                    Width="167"
                    Height="51"
                    Background="{StaticResource BackgroundColorBrushAlt}"
                    BorderBrush="{StaticResource BorderBrush}"
                    BorderThickness="1"
                    CornerRadius="2"
                    Effect="{StaticResource MenuShadowButtonBorder}">
                    <Border>
                        <Border.Background>
                            <SolidColorBrush x:Name="SetFitBrush" Color="Transparent" />
                        </Border.Background>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <TextBlock 
                                FontSize="13"
                                FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto" 
                                Text="{StaticResource AutoFitWindow}"                
                                MaxWidth="135"
                                TextWrapping="Wrap"
                                TextTrimming="CharacterEllipsis"
                                TextAlignment="Center"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center">
                                <TextBlock.Foreground>
                                    <SolidColorBrush x:Name="SetFitFill" Color="{StaticResource MainColor}" />
                                </TextBlock.Foreground>
                            </TextBlock>
                            <CheckBox x:Name="SetFit" Style="{StaticResource Checkstyle}" />
                        </StackPanel>
                    </Border>
                </Border>

                <Border
                    x:Name="ToggleFillBorder"
                    Canvas.Left="184"
                    Canvas.Top="114"
                    Width="167"
                    Height="51" 
                    Background="{StaticResource BackgroundColorBrushAlt}"
                    BorderBrush="{StaticResource BorderBrush}"
                    BorderThickness="1"
                    CornerRadius="2"
                    Effect="{StaticResource MenuShadowButtonBorder}">
                    <Border>
                        <Border.Background>
                            <SolidColorBrush x:Name="ToggleFillBrush" Color="Transparent" />
                        </Border.Background>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <TextBlock 
                                FontSize="13"
                                FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto" 
                                Text="{StaticResource FillImageHeight}"   
                                MaxWidth="135"
                                TextWrapping="Wrap"
                                TextTrimming="CharacterEllipsis"
                                TextAlignment="Center"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center">
                                <TextBlock.Foreground>
                                    <SolidColorBrush x:Name="ToggleFillFill" Color="{StaticResource MainColor}" />
                                </TextBlock.Foreground>
                            </TextBlock>
                            <CheckBox
                                x:Name="ToggleFill"
                                HorizontalContentAlignment="Center" 
                                Style="{StaticResource Checkstyle}" />
                        </StackPanel>
                    </Border>
                </Border>

                <Border
                    x:Name="ToggleScrollBorder"
                    Canvas.Left="184"
                    Canvas.Top="169"
                    Width="167"
                    Height="51"
                    Background="{StaticResource BackgroundColorBrushAlt}"
                    BorderBrush="{StaticResource BorderBrush}"
                    BorderThickness="1"
                    CornerRadius="2"
                    Effect="{StaticResource MenuShadowButtonBorder}">
                    <Border>
                        <Border.Background>
                            <SolidColorBrush x:Name="ToggleScrollBrush" Color="Transparent" />
                        </Border.Background>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <TextBlock 
                                FontSize="13"
                                FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto" 
                                Text="{StaticResource ToggleScroll}"        
                                MaxWidth="135"
                                TextWrapping="Wrap"
                                TextTrimming="CharacterEllipsis"
                                TextAlignment="Center"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center">
                                <TextBlock.Foreground>
                                    <SolidColorBrush x:Name="ToggleScrollFill" Color="{StaticResource MainColor}" />
                                </TextBlock.Foreground>
                            </TextBlock>
                            <CheckBox x:Name="ToggleScroll" Style="{StaticResource Checkstyle}" />
                        </StackPanel>
                    </Border>
                </Border>

                <Border
                    x:Name="ToggleLoopingBorder"
                    Canvas.Left="6"
                    Canvas.Top="169"
                    Width="167"
                    Height="51"
                    Background="{StaticResource BackgroundColorBrushAlt}"
                    BorderBrush="{StaticResource BorderBrush}"
                    BorderThickness="1"
                    CornerRadius="2"
                    Effect="{StaticResource MenuShadowButtonBorder}">
                    <Border>
                        <Border.Background>
                            <SolidColorBrush x:Name="ToggleLoopBrush" Color="Transparent" />
                        </Border.Background>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <TextBlock 
                                FontSize="13"
                                FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto" 
                                Text="{StaticResource ToggleLooping}"      
                                MaxWidth="135"
                                TextWrapping="Wrap"
                                TextTrimming="CharacterEllipsis"
                                TextAlignment="Center"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center">
                                <TextBlock.Foreground>
                                    <SolidColorBrush x:Name="ToggleLoopFill" Color="{StaticResource MainColor}" />
                                </TextBlock.Foreground>
                            </TextBlock>
                            <CheckBox x:Name="ToggleLooping" Style="{StaticResource Checkstyle}" />
                        </StackPanel>
                    </Border>
                </Border>


            </Canvas>
        </Border>
        <Rectangle
            Width="24"
            Height="2"
            Margin="0,-2,87,0"
            HorizontalAlignment="Right"
            Fill="{StaticResource BorderBrushAlt}" />
        <Polygon
            Margin="244,-7,0,0"
            Panel.ZIndex="-1"
            Fill="{StaticResource BorderBrushAlt}"
            Points="0,0 15,30, 30,0"
            Stroke="{StaticResource BorderBrush}"
            StrokeThickness="1" />
    </StackPanel>
</UserControl>