<UserControl
    Background="Transparent"
    Height="160"
    IsVisible="{CompiledBinding HoverbarViewModel.IsHoverbarVisible.Value}"
    Margin="{CompiledBinding Gallery.GalleryMargin.Value}"
    Opacity="0"
    VerticalAlignment="Bottom"
    x:Class="PicView.Avalonia.Views.UC.HoverBar"
    x:DataType="viewModels:MainViewModel"
    xmlns="https://github.com/avaloniaui"
    xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls"
    xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Border
        Background="{DynamicResource MainBackgroundColor}"
        BorderBrush="{DynamicResource MainBorderColor}"
        BorderThickness="1"
        CornerRadius="6"
        Height="37"
        MaxWidth="{CompiledBinding HoverbarViewModel.MaxWidth}"
        x:Name="BottomBorder">
        <DockPanel LastChildFill="True">
            <customControls:IconButton
                Background="{DynamicResource SecondaryButtonBackgroundColor}"
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="noBorderHover"
                Command="{CompiledBinding Tools.OpenFileCommand}"
                CornerRadius="6,0,0,6"
                Data="{StaticResource AltFolderGeometry}"
                Foreground="{DynamicResource MainTextColor}"
                Height="35"
                IconHeight="17"
                IconWidth="20"
                IsTabStop="False"
                ToolTip.Tip="{CompiledBinding Translation.OpenFileDialog.Value,
                                              Mode=OneWay}"
                Width="38"
                x:Name="FileMenuButton" />

            <customControls:IconButton
                Background="{DynamicResource SecondaryButtonBackgroundColor}"
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="noBorderHover"
                Command="{CompiledBinding Tools.ZoomOutCommand}"
                Foreground="{DynamicResource MainTextColor}"
                Height="35"
                Icon="{StaticResource ZoomOutImage}"
                IconHeight="18"
                IconWidth="21"
                IsTabStop="False"
                Width="38"
                x:Name="ZoomOutMenuButton" />

            <customControls:IconButton
                Background="{DynamicResource SecondaryButtonBackgroundColor}"
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="noBorderHover"
                Command="{CompiledBinding Tools.ZoomInCommand}"
                Foreground="{DynamicResource MainTextColor}"
                Height="35"
                Icon="{StaticResource ZoomAltImage}"
                IconHeight="18"
                IconWidth="21"
                IsTabStop="False"
                Width="38"
                x:Name="ZoomInMenuButton" />

            <customControls:IconButton
                Background="{DynamicResource SecondaryButtonBackgroundColor}"
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="noBorderHover"
                Command="{CompiledBinding Tools.RotateLeftCommand}"
                Data="{StaticResource RotateLeftGeometry}"
                Foreground="{DynamicResource MainTextColor}"
                Height="35"
                IconHeight="16"
                IconWidth="16"
                IsEnabled="{CompiledBinding PicViewer.ImageSource.Value,
                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                IsRepeatEnabled="False"
                Margin="0"
                ToolTip.Tip="{CompiledBinding Translation.RotateLeft.Value,
                                              Mode=OneWay}"
                Width="38"
                x:Name="RotateLeftButton" />

            <customControls:IconButton
                Background="{DynamicResource SecondaryButtonBackgroundColor}"
                Classes="noBorderHover"
                Command="{CompiledBinding Tools.RotateRightCommand}"
                Data="{StaticResource RotateRightGeometry}"
                DockPanel.Dock="Left"
                Foreground="{DynamicResource MainTextColor}"
                Height="35"
                IconHeight="16"
                IconWidth="16"
                IsEnabled="{CompiledBinding PicViewer.ImageSource.Value,
                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                IsRepeatEnabled="False"
                Margin="0"
                ToolTip.Tip="{CompiledBinding Translation.RotateRight.Value,
                                              Mode=OneWay}"
                Width="38"
                x:Name="RotateRightButton" />

            <customControls:IconButton
                Background="{DynamicResource SecondaryButtonBackgroundColor}"
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="1,0,1,0"
                Classes="noBorderHover"
                Command="{CompiledBinding Tools.FlipCommand}"
                Data="{StaticResource FlipGeometry}"
                DockPanel.Dock="Left"
                Foreground="{DynamicResource MainTextColor}"
                Height="35"
                IconHeight="17"
                IconWidth="17"
                IsEnabled="{CompiledBinding PicViewer.ImageSource.Value,
                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                IsRepeatEnabled="False"
                Margin="0"
                ToolTip.Tip="{CompiledBinding Translation.IsFlipped.Value,
                                              Mode=OneWay}"
                Width="38"
                x:Name="FlipButton">
                <Button.RenderTransform>
                    <ScaleTransform ScaleX="{CompiledBinding PicViewer.ScaleX.Value}" />
                </Button.RenderTransform>
            </customControls:IconButton>

            <customControls:IconButton
                Background="{DynamicResource SecondaryButtonBackgroundColor}"
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="noBorderHover"
                Foreground="{DynamicResource MainTextColor}"
                Height="35"
                Icon="{StaticResource UpImage}"
                IconHeight="17"
                IconWidth="17"
                IsTabStop="False"
                Width="38"
                x:Name="ImageMenuButton" />

            <customControls:IconButton
                Background="{DynamicResource SecondaryButtonBackgroundColor}"
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="noBorderHover"
                Data="{StaticResource CogGeometry}"
                Foreground="{DynamicResource MainTextColor}"
                Height="35"
                IconHeight="18"
                IconWidth="18"
                IsTabStop="False"
                Width="38"
                x:Name="SettingsMenuButton" />

            <customControls:IconButton
                Background="{DynamicResource MainButtonBackgroundColor}"
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="hover"
                Data="{StaticResource FilledArrowLeftGeometry}"
                Focusable="False"
                Foreground="{DynamicResource MainTextColor}"
                Height="35"
                IconHeight="20"
                IconWidth="17"
                IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                IsTabStop="False"
                Width="80"
                x:Name="PreviousButton" />

            <customControls:IconButton
                Background="{DynamicResource MainButtonBackgroundColor}"
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="hover"
                Data="{StaticResource FilledArrowRightGeometry}"
                Focusable="False"
                Foreground="{DynamicResource MainTextColor}"
                Height="35"
                IconHeight="20"
                IconWidth="17"
                IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                IsTabStop="False"
                Width="80"
                x:Name="NextButton" />

            <customControls:DraggableProgressBar
                CornerRadius="0,6,6,0"
                CurrentIndex="{CompiledBinding PicViewer.Index.Value}"
                DragSensitivity="1"
                IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                Maximum="{CompiledBinding PicViewer.Maximum.Value}"
                ThumbFill="{DynamicResource SecondaryBorderColor}"
                x:Name="ProgressBar" />
        </DockPanel>
    </Border>
</UserControl>
