Răsfoiți Sursa

Enhance UI consistency and apply light theme improvements.

- Unified hover and button styling across `HoverBar`, `ImageMenu`, and `BottomBar`.
- Added transparent styling logic centralized via `GlassThemeHelper`.
- Refined `DraggableProgressBar` appearance for non-dark themes.
- Adjusted colors in `MainColors.axaml` for enhanced visual clarity on borders and backgrounds.
- Improved `DateTimeInput` handling with visibility toggling based on file existence.
- Fixed missing theme binding in `Menu.axaml` and progress bar thumb fill.
Ruben 4 zile în urmă
părinte
comite
ff2acb3b0b

+ 8 - 0
src/PicView.Avalonia.Win32/Views/ImageInfoWindow.axaml

@@ -110,6 +110,8 @@
                     Height="28"
                     IconHeight="17"
                     IconWidth="17"
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
+                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                     IsVisible="{CompiledBinding InfoWindow.IsExtraButtonsEnabled.Value}"
                     ToolTip.Tip="{CompiledBinding Translation.DeleteFile.Value,
                                                   Mode=OneWay}"
@@ -178,6 +180,8 @@
                     IconHeight="17"
                     IconMargin="10,0,5,0"
                     IconWidth="17"
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
+                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                     IsVisible="{CompiledBinding InfoWindow.IsExtraButtonsEnabled.Value}"
                     Text="{CompiledBinding Translation.OpenWith.Value,
                                            Mode=OneWay}"
@@ -200,6 +204,8 @@
                     Height="28"
                     IconHeight="17"
                     IconWidth="17"
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
+                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                     IsVisible="{CompiledBinding InfoWindow.IsExtraButtonsEnabled.Value}"
                     ToolTip.Tip="{CompiledBinding Translation.DuplicateFile.Value,
                                                   Mode=OneWay}"
@@ -219,6 +225,8 @@
                     Height="28"
                     IconHeight="17"
                     IconWidth="17"
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
+                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                     IsVisible="{CompiledBinding InfoWindow.IsExtraButtonsEnabled.Value}"
                     ToolTip.Tip="{CompiledBinding Translation.ShowInFolder.Value,
                                                   Mode=OneWay}"

+ 0 - 2
src/PicView.Avalonia.Win32/Views/WinMainWindow.axaml.cs

@@ -82,8 +82,6 @@ public partial class WinMainWindow : Window
                 }
             });
         };
-
-        desktop.ShutdownRequested += async (_, e) => { await WindowFunctions.WindowClosingBehavior(this); };
     }
 
     protected override async void OnClosing(WindowClosingEventArgs e)

+ 12 - 30
src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml.cs

@@ -1,7 +1,6 @@
-using Avalonia;
 using Avalonia.Controls;
 using Avalonia.Input;
-using Avalonia.Media;
+using PicView.Avalonia.ColorManagement;
 using PicView.Avalonia.DragAndDrop;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
@@ -30,15 +29,16 @@ public partial class WinTitleBar : UserControl
     // Extract method: centralize glass theme styling to remove duplication
     private void ApplyGlassThemeStyles()
     {
-        ApplyTransparentStyle(TopWindowBorder);
-        ApplyTransparentStyle(LogoBorder);
-        ApplyTransparentStyle(EditableTitlebar);
-        ApplyTransparentStyle(CloseButton);
-        ApplyTransparentStyle(MinimizeButton);
-        ApplyTransparentStyle(RestoreButton);
-        ApplyTransparentStyle(FullscreenButton);
-        ApplyTransparentStyle(GalleryButton);
-        ApplyTransparentStyle(MenuButton);
+        GlassThemeHelper.ApplyTransparentStyle(TopWindowBorder);
+        GlassThemeHelper.ApplyTransparentStyle(LogoBorder);
+        GlassThemeHelper.ApplyTransparentStyle(EditableTitlebar);
+        GlassThemeHelper.ApplyTransparentStyle(CloseButton);
+        GlassThemeHelper.ApplyTransparentStyle(MinimizeButton);
+        GlassThemeHelper.ApplyTransparentStyle(RestoreButton);
+        GlassThemeHelper.ApplyTransparentStyle(FullscreenButton);
+        GlassThemeHelper.ApplyTransparentStyle(GalleryButton);
+        GlassThemeHelper.ApplyTransparentStyle(MenuButton);
+        GlassThemeHelper.ApplyTransparentStyle(MainMenu);
 
         var glassForeground = UIHelper.GetBrush("SecondaryTextColor");
         EditableTitlebar.Foreground = glassForeground;
@@ -48,25 +48,7 @@ public partial class WinTitleBar : UserControl
         GalleryButton.Foreground = glassForeground;
         MenuButton.Foreground = glassForeground;
     }
-
-    private void ApplyTransparentStyle(UserControl control)
-    {
-        control.Background = Brushes.Transparent;
-        control.BorderThickness = new Thickness(0);
-    }
-
-    private void ApplyTransparentStyle(Button button)
-    {
-        button.Background = Brushes.Transparent;
-        button.BorderThickness = new Thickness(0);
-    }
-
-    private static void ApplyTransparentStyle(Border borderLike)
-    {
-        borderLike.Background = Brushes.Transparent;
-        borderLike.BorderThickness = new Thickness(0);
-    }
-
+    
     private void InitializeEventHandlers()
     {
         if (DataContext is not MainViewModel vm)

+ 25 - 1
src/PicView.Avalonia/ColorManagement/GlassThemeHelper.cs

@@ -1,4 +1,5 @@
 using Avalonia;
+using Avalonia.Controls;
 using Avalonia.Media;
 using Avalonia.Styling;
 
@@ -45,6 +46,29 @@ public static class GlassThemeHelper
         Application.Current.Resources["MenuButtonColor"] = Color.Parse("#50797979");
         
         Application.Current.Resources["WindowBorderColor"] = Color.Parse("#15FFFFFF");
-        
+    }
+
+    public static void ApplyTransparentStyle(Menu borderLike)
+    {
+        borderLike.Background = Brushes.Transparent;
+        borderLike.BorderThickness = new Thickness(0);
+    }
+
+    public static void ApplyTransparentStyle(UserControl control)
+    {
+        control.Background = Brushes.Transparent;
+        control.BorderThickness = new Thickness(0);
+    }
+
+    public static void ApplyTransparentStyle(Button button)
+    {
+        button.Background = Brushes.Transparent;
+        button.BorderThickness = new Thickness(0);
+    }
+
+    public static void ApplyTransparentStyle(Border borderLike)
+    {
+        borderLike.Background = Brushes.Transparent;
+        borderLike.BorderThickness = new Thickness(0);
     }
 }

+ 1 - 0
src/PicView.Avalonia/CustomControls/DateTimeInput.axaml

@@ -14,6 +14,7 @@
                     BorderBrush="{TemplateBinding BorderBrush}"
                     BorderThickness="{TemplateBinding BorderThickness}"
                     CornerRadius="{TemplateBinding CornerRadius}"
+                    MinHeight="35"
                     Name="border"
                     Padding="{TemplateBinding Padding}">
                     <!--  This is the panel where the text boxes will be dynamically added  -->

+ 18 - 6
src/PicView.Avalonia/CustomControls/DateTimeInput.axaml.cs

@@ -9,6 +9,7 @@ using Avalonia.Layout;
 using Avalonia.LogicalTree;
 using Avalonia.Media;
 using PicView.Avalonia.UI;
+using PicView.Avalonia.ViewModels;
 using R3;
 
 namespace PicView.Avalonia.CustomControls;
@@ -46,6 +47,7 @@ public class DateTimeInput : TemplatedControl
     private CompositeDisposable _disposables = new();
 
     private const string PARTContainer = "PART_Container";
+    private StackPanel? _partStackPanel;
 
     /// <summary>
     /// Static constructor to register the default style for this control.
@@ -76,11 +78,10 @@ public class DateTimeInput : TemplatedControl
         base.OnApplyTemplate(e);
 
         // Find the container that will hold our dynamic controls.
-        var container = e.NameScope.Find<Panel>(PARTContainer);
-        if (container == null)
-        {
-            throw new InvalidOperationException("Could not find PART_Container in the control template.");
-        }
+        var container = e.NameScope.Find<StackPanel>(PARTContainer);
+
+        _partStackPanel = container ??
+                          throw new InvalidOperationException("Could not find PART_Container in the control template.");
 
         // Generate and add the date/time input controls based on current culture.
         BuildInputControls(container);
@@ -94,6 +95,17 @@ public class DateTimeInput : TemplatedControl
     /// </summary>
     private void OnSelectedDateTimeChanged(AvaloniaPropertyChangedEventArgs e)
     {
+        if (DataContext is MainViewModel vm)
+        {
+            if (vm.PicViewer?.FileInfo.Value?.Exists == true)
+            {
+                _partStackPanel.IsVisible = true;
+            }
+            else
+            {
+                _partStackPanel.IsVisible = false;
+            }
+        }
         // Set a flag to indicate that the update is coming from the property,
         // not from user input in the TextBoxes.
         _isUpdatingFromProperty = true;
@@ -106,7 +118,7 @@ public class DateTimeInput : TemplatedControl
     /// in an order determined by the current culture.
     /// </summary>
     /// <param name="container">The panel to add controls to.</param>
-    private void BuildInputControls(Panel container)
+    private void BuildInputControls(StackPanel container)
     {
         // Detach handlers from previously created controls and clear subscriptions.
         DetachHandlersAndClearState();

+ 4 - 0
src/PicView.Avalonia/CustomControls/DateTimePickerButtons.axaml

@@ -23,6 +23,8 @@
                 Icon="{StaticResource CalendarImage}"
                 IconHeight="16"
                 IconWidth="16"
+                IsVisible="{CompiledBinding PicViewer.FileInfo.Value,
+                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                 Width="35"
                 ZIndex="1"
                 x:Name="CalendarButton" />
@@ -33,6 +35,8 @@
                 Icon="{StaticResource ClockImage}"
                 IconHeight="18"
                 IconWidth="18"
+                IsVisible="{CompiledBinding PicViewer.FileInfo.Value,
+                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                 Width="35"
                 ZIndex="1"
                 x:Name="TimePickerButton" />

+ 0 - 2
src/PicView.Avalonia/CustomControls/DraggableProgressBar.axaml

@@ -35,7 +35,5 @@
                 </Border>
             </ControlTemplate>
         </Setter>
-        <!--  Set a default color for the thumb, can be overridden  -->
-        <Setter Property="ThumbFill" Value="{DynamicResource SecondaryBorderColor}" />
     </Style>
 </Styles>

+ 7 - 0
src/PicView.Avalonia/CustomControls/DraggableProgressBar.axaml.cs

@@ -9,6 +9,7 @@ using Avalonia.LogicalTree;
 using Avalonia.Media;
 using Avalonia.Threading;
 using PicView.Avalonia.Navigation;
+using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
 using R3;
@@ -126,6 +127,12 @@ public class DraggableProgressBar : TemplatedControl
         base.OnApplyTemplate(e);
         _track = e.NameScope.Find<Border>("PART_Track");
         _thumb = e.NameScope.Find<Ellipse>("PART_Thumb");
+
+        if (!Settings.Theme.Dark)
+        {
+            _track.Background = UIHelper.GetBrush("SecondaryBackgroundColor");
+            _thumb.Fill = UIHelper.GetBrush("TertiaryBackgroundColor");
+        }
     }
 
     // Recalculate thumb position when CurrentIndex or Maximum changes

+ 4 - 0
src/PicView.Avalonia/PicViewTheme/Controls/Menu.axaml

@@ -57,6 +57,10 @@
             <Setter Property="Background" Value="{DynamicResource AccentColor}" />
         </Style>
 
+        <Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
+            <Setter Property="Foreground" Value="{StaticResource SecondaryTextColor}" />
+        </Style>
+
         <Style Selector="^:empty /template/ Path#rightArrow">
             <Setter Property="IsVisible" Value="False" />
         </Style>

+ 9 - 0
src/PicView.Avalonia/PicViewTheme/Controls/MenuItem.axaml

@@ -229,6 +229,7 @@
                         </Grid.ColumnDefinitions>
                         <ContentControl
                             Content="{TemplateBinding Icon}"
+                            Foreground="{TemplateBinding Foreground}"
                             Height="16"
                             HorizontalAlignment="Center"
                             Margin="5,0,0,0"
@@ -332,6 +333,10 @@
             <Setter Property="Effect" Value="{StaticResource TextShadow}" />
         </Style>
 
+        <Style Selector="^:not(.noHover):selected /template/ ContentPresenter#icon">
+            <Setter Property="Foreground" Value="{StaticResource SecondaryTextColor}" />
+        </Style>
+
         <Style Selector="^:empty /template/ Path#rightArrow">
             <Setter Property="IsVisible" Value="False" />
         </Style>
@@ -350,5 +355,9 @@
             <Setter Property="Effect" Value="{StaticResource TextShadow}" />
         </Style>
 
+        <Style Selector="^.active /template/ ContentPresenter#icon">
+            <Setter Property="Foreground" Value="{StaticResource SecondaryTextColor}" />
+        </Style>
+
     </ControlTheme>
 </ResourceDictionary>

+ 3 - 1
src/PicView.Avalonia/PicViewTheme/Controls/TextBox.axaml

@@ -1,7 +1,6 @@
 <ResourceDictionary
     x:ClassModifier="internal"
     xmlns="https://github.com/avaloniaui"
-    xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
     <ControlTheme TargetType="TextBox" x:Key="{x:Type TextBox}">
@@ -106,6 +105,9 @@
         <Style Selector="^:disabled /template/ TextBlock#watermark">
             <Setter Property="IsVisible" Value="False" />
         </Style>
+        <Style Selector="^:disabled /template/ TextPresenter#PART_TextPresenter">
+            <Setter Property="IsVisible" Value="False" />
+        </Style>
 
         <Style Selector="^.txtShadow /template/ TextPresenter#PART_TextPresenter">
             <Setter Property="Effect" Value="{StaticResource TextShadow}" />

+ 3 - 3
src/PicView.Avalonia/PicViewTheme/ResourceDictionaries/MainColors.axaml

@@ -29,7 +29,7 @@
 
             <Color x:Key="MainBorderColor">#FF3A3A3A</Color>
             <Color x:Key="SecondaryBorderColor">#777</Color>
-            <Color x:Key="TertiaryBorderColor">#4B4B4B</Color>
+            <Color x:Key="TertiaryBorderColor">#A4646464</Color>
 
             <Color x:Key="OuterBorderColor">#FF3A3A3A</Color>
 
@@ -93,11 +93,11 @@
             <Color x:Key="AltBackgroundColor">#A7FFFFFF</Color>
 
             <Color x:Key="MainButtonBackgroundColor">#fff</Color>
-            <Color x:Key="SecondaryButtonBackgroundColor">#F1E1E1E1</Color>
+            <Color x:Key="SecondaryButtonBackgroundColor">WhiteSmoke</Color>
 
             <Color x:Key="MainBorderColor">#DEDEDE</Color>
             <Color x:Key="SecondaryBorderColor">#95B5B5B5</Color>
-            <Color x:Key="TertiaryBorderColor">#77D8D8D8</Color>
+            <Color x:Key="TertiaryBorderColor">#CFABABAB</Color>
 
             <Color x:Key="OuterBorderColor">#78B5B5B5</Color>
 

+ 8 - 2
src/PicView.Avalonia/Views/Main/ImageInfoView.axaml

@@ -5,7 +5,6 @@
     x:Class="PicView.Avalonia.Views.Main.ImageInfoView"
     x:DataType="vm:MainViewModel"
     xmlns="https://github.com/avaloniaui"
-    xmlns:converters="clr-namespace:PicView.Avalonia.Converters"
     xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls"
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -786,6 +785,8 @@
                             <customControls:CopyButton
                                 Classes="altHover BorderStyle"
                                 CopyText="{Binding Path=Text, ElementName=FileSizeBox}"
+                                IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
+                                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                                 IsVisible="{CompiledBinding InfoWindow.IsCopyButtonEnabled.Value}"
                                 ToolTip.Tip="{CompiledBinding Translation.Copy.Value,
                                                               Mode=OneWay}">
@@ -802,6 +803,8 @@
                                                        Mode=OneWay}"
                                 Width="{CompiledBinding InfoWindow.TextWidth}" />
                             <customControls:DateTimePickerButtons
+                                IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
+                                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                                 Margin="5,0,0,0"
                                 SelectedDateTime="{CompiledBinding PicViewer.FileInfo.Value.CreationTime,
                                                                    Mode=TwoWay}"
@@ -827,6 +830,8 @@
                                                        Mode=OneWay}"
                                 Width="{CompiledBinding InfoWindow.TextWidth}" />
                             <customControls:DateTimePickerButtons
+                                IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
+                                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                                 Margin="5,0,0,0"
                                 SelectedDateTime="{CompiledBinding PicViewer.FileInfo.Value.LastWriteTime,
                                                                    Mode=TwoWay}"
@@ -851,6 +856,8 @@
                                                        Mode=OneWay}"
                                 Width="{CompiledBinding InfoWindow.TextWidth}" />
                             <customControls:DateTimePickerButtons
+                                IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
+                                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                                 Margin="5,0,0,0"
                                 SelectedDateTime="{CompiledBinding PicViewer.FileInfo.Value.LastAccessTime,
                                                                    Mode=TwoWay}"
@@ -871,7 +878,6 @@
 
 
 
-
                     <!--  Copyright, comment, etc.  -->
                     <StackPanel IsEnabled="{CompiledBinding Exif.IsExifAvailable.Value}">
 

+ 2 - 0
src/PicView.Avalonia/Views/UC/BottomBar.axaml.cs

@@ -122,6 +122,8 @@ public partial class BottomBar : UserControl
                 FlipButton.Classes.Remove("noBorderHover");
                 RotateRightButton.Classes.Add("noBorderHoverAlt");
                 FlipButton.Classes.Add("noBorderHoverAlt");
+
+
             }
         };
     }

+ 1 - 0
src/PicView.Avalonia/Views/UC/HoverBar.axaml

@@ -305,6 +305,7 @@
                     IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
                     Maximum="{CompiledBinding PicViewer.Maximum.Value}"
+                    ThumbFill="{DynamicResource SecondaryBorderColor}"
                     x:Name="ProgressBar" />
             </DockPanel>
         </Border>

+ 28 - 0
src/PicView.Avalonia/Views/UC/HoverBar.axaml.cs

@@ -20,6 +20,34 @@ public partial class HoverBar : UserControl
     {
         InitializeComponent();
         Loaded += OnLoaded;
+        if (Settings.Theme.Dark)
+        {
+            return;
+        }
+
+        FileMenuButton.Classes.Remove("noBorderHover");
+        FileMenuButton.Classes.Add("hover");
+
+        ZoomOutMenuButton.Classes.Remove("noBorderHover");
+        ZoomOutMenuButton.Classes.Add("hover");
+
+        ZoomInMenuButton.Classes.Remove("noBorderHover");
+        ZoomInMenuButton.Classes.Add("hover");
+
+        RotateLeftButton.Classes.Remove("noBorderHover");
+        RotateLeftButton.Classes.Add("hover");
+
+        RotateRightButton.Classes.Remove("noBorderHover");
+        RotateRightButton.Classes.Add("hover");
+
+        FlipButton.Classes.Remove("noBorderHover");
+        FlipButton.Classes.Add("hover");
+
+        ImageMenuButton.Classes.Remove("noBorderHover");
+        ImageMenuButton.Classes.Add("hover");
+
+        SettingsMenuButton.Classes.Remove("noBorderHover");
+        SettingsMenuButton.Classes.Add("hover");
     }
 
     private void OnLoaded(object? sender, RoutedEventArgs e)

+ 39 - 39
src/PicView.Avalonia/Views/UC/Menus/ImageMenu.axaml.cs

@@ -20,7 +20,7 @@ public partial class ImageMenu : AnimatedMenu
                 .Skip(1)
                 .Where(isVisible => !isVisible)
                 .Subscribe(_ => { SlideShowButton.Flyout.Hide(); });
-            
+
             // Determine if crop should be enabled every time it opens
             this.GetObservable(IsOpenProperty).ToObservable()
                 .Where(x => x)
@@ -35,62 +35,62 @@ public partial class ImageMenu : AnimatedMenu
             Item90.Header = $"90 {TranslationManager.Translation.SecAbbreviation}";
             Item120.Header = $"120 {TranslationManager.Translation.SecAbbreviation}";
 
-            if (DataContext is not MainViewModel vm)
+            if (Settings.Theme.Dark)
             {
                 return;
             }
 
 
-            if (!Settings.Theme.Dark)
-            {
-                TopBorder.Background = Brushes.White;
+            TopBorder.Background = Brushes.White;
 
-                CropButton.Classes.Remove("altHover");
-                CropButton.Classes.Add("hover");
+            CropButton.Classes.Remove("altHover");
+            CropButton.Classes.Add("hover");
 
-                GalleryButton.Classes.Remove("altHover");
-                GalleryButton.Classes.Add("hover");
+            GalleryButton.Classes.Remove("altHover");
+            GalleryButton.Classes.Add("hover");
 
-                SideBySideButton.Classes.Remove("altHover");
-                SideBySideButton.Classes.Add("hover");
-                if (TryGetResource("SideBrush", Application.Current.RequestedThemeVariant,
-                        out var sideBrush))
+            SideBySideButton.Classes.Remove("altHover");
+            SideBySideButton.Classes.Add("hover");
+            if (TryGetResource("SideBrush", Application.Current.RequestedThemeVariant,
+                    out var sideBrush))
+            {
+                if (sideBrush is SolidColorBrush brush)
                 {
-                    if (sideBrush is SolidColorBrush brush)
-                    {
-                        UIHelper.SetButtonHover(SideBySideButton, brush);
-                    }
+                    UIHelper.SetButtonHover(SideBySideButton, brush);
                 }
+            }
 
-                ResizeImageButton.Classes.Remove("altHover");
-                ResizeImageButton.Classes.Add("hover");
-                if (TryGetResource("ResizeBrush", Application.Current.RequestedThemeVariant,
-                        out var value))
+            ResizeImageButton.Classes.Remove("altHover");
+            ResizeImageButton.Classes.Add("hover");
+            if (TryGetResource("ResizeBrush", Application.Current.RequestedThemeVariant,
+                    out var value))
+            {
+                if (value is SolidColorBrush brush)
                 {
-                    if (value is SolidColorBrush brush)
-                    {
-                        UIHelper.SetButtonHover(ResizeImageButton, brush);
-                    }
+                    UIHelper.SetButtonHover(ResizeImageButton, brush);
                 }
+            }
 
-                SlideShowButton.Classes.Remove("altHover");
-                SlideShowButton.Classes.Add("hover");
-                if (Application.Current.TryGetResource("SlideshowAltImage", Application.Current.RequestedThemeVariant,
-                        out var slideshowAltImage) && Application.Current.TryGetResource("SlideshowImage",
+            SlideShowButton.Classes.Remove("altHover");
+            SlideShowButton.Classes.Add("hover");
+            if (Application.Current.TryGetResource("SlideshowAltImage", Application.Current.RequestedThemeVariant,
+                    out var slideshowAltImage) && Application.Current.TryGetResource("SlideshowImage",
+                    Application.Current.RequestedThemeVariant,
+                    out var slideshowImage))
+            {
+                if (slideshowAltImage is DrawingImage imgAlt && slideshowImage is DrawingImage img &&
+                    TryGetResource("SlideShowBrush",
                         Application.Current.RequestedThemeVariant,
-                        out var slideshowImage))
+                        out var slideshowBrush))
                 {
-                    if (slideshowAltImage is DrawingImage imgAlt && slideshowImage is DrawingImage img &&
-                        TryGetResource("SlideShowBrush",
-                            Application.Current.RequestedThemeVariant,
-                            out var slideshowBrush))
-                    {
-                        UIHelper.SetButtonHover(SlideShowButton, slideshowBrush as SolidColorBrush);
-                        SlideShowButton.PointerEntered += (_, _) => { SlideShowImage.Source = imgAlt; };
-                        SlideShowButton.PointerExited += (_, _) => { SlideShowImage.Source = img; };
-                    }
+                    UIHelper.SetButtonHover(SlideShowButton, slideshowBrush as SolidColorBrush);
+                    SlideShowButton.PointerEntered += (_, _) => { SlideShowImage.Source = imgAlt; };
+                    SlideShowButton.PointerExited += (_, _) => { SlideShowImage.Source = img; };
                 }
             }
+
+            ImageInfoButton.Classes.Remove("altHover");
+            ImageInfoButton.Classes.Add("hover");
         };
     }