Browse Source

GLobal usings to simplify calling settings

Ruben 8 tháng trước cách đây
mục cha
commit
0ad09e6006
81 tập tin đã thay đổi với 453 bổ sung528 xóa
  1. 1 2
      src/PicView.Avalonia.MacOS/App.axaml.cs
  2. 1 0
      src/PicView.Avalonia.MacOS/GlobalUsings.cs
  3. 1 2
      src/PicView.Avalonia.MacOS/Program.cs
  4. 1 2
      src/PicView.Avalonia.MacOS/Views/AboutWindow.axaml.cs
  5. 1 2
      src/PicView.Avalonia.MacOS/Views/EffectsWindow.axaml.cs
  6. 1 3
      src/PicView.Avalonia.MacOS/Views/ExifWindow.axaml.cs
  7. 1 2
      src/PicView.Avalonia.MacOS/Views/KeybindingsWindow.axaml.cs
  8. 0 1
      src/PicView.Avalonia.MacOS/Views/MacMainWindow.axaml.cs
  9. 1 4
      src/PicView.Avalonia.MacOS/Views/MacOSTitlebar.axaml.cs
  10. 2 3
      src/PicView.Avalonia.MacOS/Views/SettingsWindow.axaml.cs
  11. 1 2
      src/PicView.Avalonia.Win32/App.axaml.cs
  12. 1 0
      src/PicView.Avalonia.Win32/GlobalUsings.cs
  13. 2 3
      src/PicView.Avalonia.Win32/Views/AboutWindow.axaml.cs
  14. 2 3
      src/PicView.Avalonia.Win32/Views/BatchResizeResizeWindow.axaml.cs
  15. 2 3
      src/PicView.Avalonia.Win32/Views/EffectsWindow.axaml.cs
  16. 3 4
      src/PicView.Avalonia.Win32/Views/ExifWindow.axaml.cs
  17. 2 3
      src/PicView.Avalonia.Win32/Views/KeybindingsWindow.axaml.cs
  18. 3 4
      src/PicView.Avalonia.Win32/Views/SettingsWindow.axaml.cs
  19. 2 3
      src/PicView.Avalonia.Win32/Views/SingleImageResizeWindow.axaml.cs
  20. 1 2
      src/PicView.Avalonia.Win32/Views/WinMainWindow.axaml.cs
  21. 1 2
      src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml.cs
  22. 5 6
      src/PicView.Avalonia/ColorManagement/BackgroundManager.cs
  23. 12 13
      src/PicView.Avalonia/ColorManagement/ColorManager.cs
  24. 10 11
      src/PicView.Avalonia/ColorManagement/ThemeManager.cs
  25. 1 2
      src/PicView.Avalonia/Crop/CropFunctions.cs
  26. 1 2
      src/PicView.Avalonia/CustomControls/AnimatedPopUp.cs
  27. 2 3
      src/PicView.Avalonia/CustomControls/CustomSlider.cs
  28. 2 3
      src/PicView.Avalonia/CustomControls/GalleryAnimationControl.cs
  29. 2 3
      src/PicView.Avalonia/CustomControls/GalleryListBox.cs
  30. 2 3
      src/PicView.Avalonia/CustomControls/IconButton.cs
  31. 1 2
      src/PicView.Avalonia/CustomControls/PicBox.cs
  32. 1 2
      src/PicView.Avalonia/DragAndDrop/DragAndDropHelper.cs
  33. 7 8
      src/PicView.Avalonia/Gallery/GalleryFunctions.cs
  34. 1 2
      src/PicView.Avalonia/Gallery/GalleryLoad.cs
  35. 1 2
      src/PicView.Avalonia/Gallery/GalleryNavigation.cs
  36. 18 19
      src/PicView.Avalonia/Gallery/GalleryStretch.cs
  37. 1 0
      src/PicView.Avalonia/GlobalUsings.cs
  38. 2 3
      src/PicView.Avalonia/ImageTransformations/Rotation.cs
  39. 2 3
      src/PicView.Avalonia/Navigation/ErrorHandling.cs
  40. 4 5
      src/PicView.Avalonia/Navigation/FileHistoryNavigation.cs
  41. 8 9
      src/PicView.Avalonia/Navigation/FileListManager.cs
  42. 10 11
      src/PicView.Avalonia/Navigation/ImageIterator.cs
  43. 9 10
      src/PicView.Avalonia/Navigation/NavigationHelper.cs
  44. 6 7
      src/PicView.Avalonia/Navigation/Slideshow.cs
  45. 7 8
      src/PicView.Avalonia/Navigation/UpdateImage.cs
  46. 8 9
      src/PicView.Avalonia/SettingsManagement/LanguageUpdater.cs
  47. 36 37
      src/PicView.Avalonia/SettingsManagement/SettingsUpdater.cs
  48. 7 8
      src/PicView.Avalonia/StartUp/QuickLoad.cs
  49. 54 55
      src/PicView.Avalonia/StartUp/StartUpHelper.cs
  50. 1 2
      src/PicView.Avalonia/UI/FunctionsHelper.cs
  51. 24 25
      src/PicView.Avalonia/UI/HideInterfaceLogic.cs
  52. 2 3
      src/PicView.Avalonia/UI/UIHelper.cs
  53. 11 12
      src/PicView.Avalonia/Views/AppearanceView.axaml.cs
  54. 3 4
      src/PicView.Avalonia/Views/BottomBar.axaml.cs
  55. 6 7
      src/PicView.Avalonia/Views/GallerySettingsView.axaml.cs
  56. 4 5
      src/PicView.Avalonia/Views/GeneralSettingsView.axaml.cs
  57. 4 5
      src/PicView.Avalonia/Views/ImageSettingsView.axaml.cs
  58. 12 13
      src/PicView.Avalonia/Views/ImageViewer.axaml.cs
  59. 9 10
      src/PicView.Avalonia/Views/LanguageView.axaml.cs
  60. 1 2
      src/PicView.Avalonia/Views/MainView.axaml.cs
  61. 8 9
      src/PicView.Avalonia/Views/MouseWheelView.axaml.cs
  62. 1 2
      src/PicView.Avalonia/Views/StartUpMenu.axaml.cs
  63. 2 3
      src/PicView.Avalonia/Views/UC/BottomGalleryItemSizeSlider.axaml.cs
  64. 1 2
      src/PicView.Avalonia/Views/UC/Buttons/ClickArrowLeft.axaml.cs
  65. 1 2
      src/PicView.Avalonia/Views/UC/Buttons/ClickArrowRight.axaml.cs
  66. 1 2
      src/PicView.Avalonia/Views/UC/CropControl.axaml.cs
  67. 1 2
      src/PicView.Avalonia/Views/UC/FullGalleryItemSizeSlider.axaml.cs
  68. 4 5
      src/PicView.Avalonia/Views/UC/GalleryItemSizeSlider.axaml.cs
  69. 2 3
      src/PicView.Avalonia/Views/UC/Menus/FileMenu.axaml.cs
  70. 2 3
      src/PicView.Avalonia/Views/UC/Menus/ImageMenu.axaml.cs
  71. 2 3
      src/PicView.Avalonia/Views/UC/Menus/SettingsMenu.axaml.cs
  72. 2 3
      src/PicView.Avalonia/Views/UC/Menus/ToolsMenu.axaml.cs
  73. 4 5
      src/PicView.Avalonia/Views/ZoomSettingsView.axaml.cs
  74. 46 47
      src/PicView.Avalonia/WindowBehavior/WindowFunctions.cs
  75. 15 16
      src/PicView.Avalonia/WindowBehavior/WindowResizing.cs
  76. 24 25
      src/PicView.Core/Calculations/ImageSizeCalculationHelper.cs
  77. 2 3
      src/PicView.Core/FileHandling/FileListHelper.cs
  78. 1 0
      src/PicView.Core/GlobalUsings.cs
  79. 3 4
      src/PicView.Core/Localization/TranslationHelper.cs
  80. 2 4
      src/PicView.Core/Navigation/ImageIteration.cs
  81. 2 1
      src/PicView.Tests/GlobalUsings.cs

+ 1 - 2
src/PicView.Avalonia.MacOS/App.axaml.cs

@@ -13,7 +13,6 @@ using PicView.Avalonia.StartUp;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.FileHandling;
 using PicView.Core.Localization;
 
@@ -49,7 +48,7 @@ public class App : Application, IPlatformSpecificService
                 return;
             }
 
-            var settingsExists = await SettingsHelper.LoadSettingsAsync().ConfigureAwait(false);
+            var settingsExists = await LoadSettingsAsync().ConfigureAwait(false);
         
             TranslationHelper.Init();
         

+ 1 - 0
src/PicView.Avalonia.MacOS/GlobalUsings.cs

@@ -0,0 +1 @@
+global using static PicView.Core.Config.SettingsHelper;

+ 1 - 2
src/PicView.Avalonia.MacOS/Program.cs

@@ -1,5 +1,4 @@
-using System;
-using Avalonia;
+using Avalonia;
 using Avalonia.Controls;
 using Avalonia.ReactiveUI;
 

+ 1 - 2
src/PicView.Avalonia.MacOS/Views/AboutWindow.axaml.cs

@@ -1,7 +1,6 @@
 using Avalonia.Controls;
 using Avalonia.Input;
 using Avalonia.Media;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.MacOS.Views;
@@ -11,7 +10,7 @@ public partial class AboutWindow : Window
     public AboutWindow()
     {
         InitializeComponent();
-        if (!SettingsHelper.Settings.Theme.Dark || SettingsHelper.Settings.Theme.GlassTheme)
+        if (!Settings.Theme.Dark || Settings.Theme.GlassTheme)
         {
             XAboutView.Background = Brushes.Transparent;
         }

+ 1 - 2
src/PicView.Avalonia.MacOS/Views/EffectsWindow.axaml.cs

@@ -2,7 +2,6 @@ using Avalonia.Controls;
 using Avalonia.Input;
 using Avalonia.Media;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.MacOS.Views;
@@ -12,7 +11,7 @@ public partial class EffectsWindow : Window
     public EffectsWindow()
     {
         InitializeComponent();
-        if (!SettingsHelper.Settings.Theme.Dark || SettingsHelper.Settings.Theme.GlassTheme)
+        if (!Settings.Theme.Dark || Settings.Theme.GlassTheme)
         {
             XEffectsView.Background = Brushes.Transparent;
         }

+ 1 - 3
src/PicView.Avalonia.MacOS/Views/ExifWindow.axaml.cs

@@ -1,8 +1,6 @@
 using Avalonia.Controls;
 using Avalonia.Input;
 using Avalonia.Media;
-using PicView.Avalonia.Views;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.MacOS.Views;
@@ -12,7 +10,7 @@ public partial class ExifWindow : Window
     public ExifWindow()
     {
         InitializeComponent();
-        if (!SettingsHelper.Settings.Theme.Dark || SettingsHelper.Settings.Theme.GlassTheme)
+        if (!Settings.Theme.Dark || Settings.Theme.GlassTheme)
         {
             WindowBorder.Background = Brushes.Transparent;
             XExifView.Background = Brushes.Transparent;

+ 1 - 2
src/PicView.Avalonia.MacOS/Views/KeybindingsWindow.axaml.cs

@@ -1,7 +1,6 @@
 using Avalonia.Controls;
 using Avalonia.Input;
 using Avalonia.Media;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.MacOS.Views;
@@ -11,7 +10,7 @@ public partial class KeybindingsWindow : Window
     public KeybindingsWindow()
     {
         InitializeComponent();
-        if (!SettingsHelper.Settings.Theme.Dark || SettingsHelper.Settings.Theme.GlassTheme)
+        if (!Settings.Theme.Dark || Settings.Theme.GlassTheme)
         {
             WindowBorder.Background = Brushes.Transparent;
             XKeybindingsView.Background = Brushes.Transparent;

+ 0 - 1
src/PicView.Avalonia.MacOS/Views/MacMainWindow.axaml.cs

@@ -1,4 +1,3 @@
-using System;
 using Avalonia.Controls;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;

+ 1 - 4
src/PicView.Avalonia.MacOS/Views/MacOSTitlebar.axaml.cs

@@ -1,11 +1,8 @@
-using System;
 using Avalonia;
 using Avalonia.Controls;
 using Avalonia.Input;
 using Avalonia.Media;
-using PicView.Avalonia.Views.UC;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.MacOS.Views;
 
@@ -16,7 +13,7 @@ public partial class MacOSTitlebar : UserControl
         InitializeComponent();
         Loaded += (_, _) =>
         {
-            if (SettingsHelper.Settings.Theme.GlassTheme)
+            if (Settings.Theme.GlassTheme)
             {
                 TopWindowBorder.Background = Brushes.Transparent;
             

+ 2 - 3
src/PicView.Avalonia.MacOS/Views/SettingsWindow.axaml.cs

@@ -1,7 +1,6 @@
 using Avalonia.Controls;
 using Avalonia.Input;
 using Avalonia.Media;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.MacOS.Views;
@@ -11,7 +10,7 @@ public partial class SettingsWindow : Window
     public SettingsWindow()
     {
         InitializeComponent();
-        if (!SettingsHelper.Settings.Theme.Dark || SettingsHelper.Settings.Theme.GlassTheme)
+        if (!Settings.Theme.Dark || Settings.Theme.GlassTheme)
         {
             TitleText.Background = Brushes.Transparent;
             XSettingsView.Background = Brushes.Transparent;
@@ -33,7 +32,7 @@ public partial class SettingsWindow : Window
         Closing += async delegate
         {
             Hide();
-            await SettingsHelper.SaveSettingsAsync();
+            await SaveSettingsAsync();
         };
     }
 

+ 1 - 2
src/PicView.Avalonia.Win32/App.axaml.cs

@@ -14,7 +14,6 @@ using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.Win32.Views;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.FileHandling;
 using PicView.Core.Localization;
 using PicView.Core.ProcessHandling;
@@ -62,7 +61,7 @@ public partial class App : Application, IPlatformSpecificService
             bool settingsExists;
             try
             {
-                settingsExists = await SettingsHelper.LoadSettingsAsync().ConfigureAwait(false);
+                settingsExists = await LoadSettingsAsync().ConfigureAwait(false);
             }
             catch (TaskCanceledException)
             {

+ 1 - 0
src/PicView.Avalonia.Win32/GlobalUsings.cs

@@ -0,0 +1 @@
+global using static PicView.Core.Config.SettingsHelper;

+ 2 - 3
src/PicView.Avalonia.Win32/Views/AboutWindow.axaml.cs

@@ -3,7 +3,6 @@ using Avalonia.Controls;
 using Avalonia.Input;
 using Avalonia.Interactivity;
 using Avalonia.Media;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.Win32.Views;
@@ -13,7 +12,7 @@ public partial class AboutWindow : Window
     public AboutWindow()
     {
         InitializeComponent();
-        if (SettingsHelper.Settings.Theme.GlassTheme)
+        if (Settings.Theme.GlassTheme)
         {
             IconBorder.Background = Brushes.Transparent;
             IconBorder.BorderThickness = new Thickness(0);
@@ -39,7 +38,7 @@ public partial class AboutWindow : Window
             MinimizeButton.Foreground = new SolidColorBrush(color);
             CloseButton.Foreground = new SolidColorBrush(color);
         }
-        else if (!SettingsHelper.Settings.Theme.Dark)
+        else if (!Settings.Theme.Dark)
         {
             ParentBorder.Background = new SolidColorBrush(Color.FromArgb(114,132, 132, 132));
         }

+ 2 - 3
src/PicView.Avalonia.Win32/Views/BatchResizeResizeWindow.axaml.cs

@@ -4,7 +4,6 @@ using Avalonia.Input;
 using Avalonia.Interactivity;
 using Avalonia.Media;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.Win32.Views;
@@ -19,7 +18,7 @@ public partial class BatchResizeWindow : Window
 
     private void StartUp()
     {
-        if (SettingsHelper.Settings.Theme.GlassTheme)
+        if (Settings.Theme.GlassTheme)
         {
             IconBorder.Background = Brushes.Transparent;
             IconBorder.BorderThickness = new Thickness(0);
@@ -45,7 +44,7 @@ public partial class BatchResizeWindow : Window
             MinimizeButton.Foreground = new SolidColorBrush(color);
             CloseButton.Foreground = new SolidColorBrush(color);
         }
-        else if (!SettingsHelper.Settings.Theme.Dark)
+        else if (!Settings.Theme.Dark)
         {
             ParentBorder.Background = new SolidColorBrush(Color.FromArgb(114, 132, 132, 132));
         }

+ 2 - 3
src/PicView.Avalonia.Win32/Views/EffectsWindow.axaml.cs

@@ -5,7 +5,6 @@ using Avalonia.Interactivity;
 using Avalonia.Media;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.Win32.Views;
@@ -15,7 +14,7 @@ public partial class EffectsWindow : Window
     public EffectsWindow()
     {
         InitializeComponent();
-        if (SettingsHelper.Settings.Theme.GlassTheme)
+        if (Settings.Theme.GlassTheme)
         {
             IconBorder.Background = Brushes.Transparent;
             IconBorder.BorderThickness = new Thickness(0);
@@ -42,7 +41,7 @@ public partial class EffectsWindow : Window
             MinimizeButton.Foreground = new SolidColorBrush(color);
             CloseButton.Foreground = new SolidColorBrush(color);
         }
-        else if (!SettingsHelper.Settings.Theme.Dark)
+        else if (!Settings.Theme.Dark)
         {
             ParentBorder.Background = new SolidColorBrush(Color.FromArgb(114,132, 132, 132));
         }

+ 3 - 4
src/PicView.Avalonia.Win32/Views/ExifWindow.axaml.cs

@@ -3,7 +3,6 @@ using Avalonia.Controls;
 using Avalonia.Input;
 using Avalonia.Interactivity;
 using Avalonia.Media;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.Win32.Views;
@@ -13,7 +12,7 @@ public partial class ExifWindow : Window
     public ExifWindow()
     {
         InitializeComponent();
-        if (SettingsHelper.Settings.Theme.GlassTheme)
+        if (Settings.Theme.GlassTheme)
         {
             BorderRectangle.Height = 0;
             
@@ -51,12 +50,12 @@ public partial class ExifWindow : Window
             OpenWithButton.Foreground = new SolidColorBrush(color);
             LocateOnDiskButton.Foreground = new SolidColorBrush(color);
         }
-        else if (!SettingsHelper.Settings.Theme.Dark)
+        else if (!Settings.Theme.Dark)
         {
             ParentBorder.Background = new SolidColorBrush(Color.FromArgb(114,132, 132, 132));
         }
 
-        if (SettingsHelper.Settings.Theme.GlassTheme || !SettingsHelper.Settings.Theme.Dark)
+        if (Settings.Theme.GlassTheme || !Settings.Theme.Dark)
         {
             RecycleButton.Classes.Remove("noBorderHover");
             RecycleButton.Classes.Add("hover");

+ 2 - 3
src/PicView.Avalonia.Win32/Views/KeybindingsWindow.axaml.cs

@@ -3,7 +3,6 @@ using Avalonia.Controls;
 using Avalonia.Input;
 using Avalonia.Interactivity;
 using Avalonia.Media;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.Win32.Views;
@@ -13,7 +12,7 @@ public partial class KeybindingsWindow : Window
     public KeybindingsWindow()
     {
         InitializeComponent();
-        if (SettingsHelper.Settings.Theme.GlassTheme)
+        if (Settings.Theme.GlassTheme)
         {
             TopWindowBorder.Background = Brushes.Transparent;
             TopWindowBorder.BorderThickness = new Thickness(0);
@@ -40,7 +39,7 @@ public partial class KeybindingsWindow : Window
             MinimizeButton.Foreground = new SolidColorBrush(color);
             CloseButton.Foreground = new SolidColorBrush(color);
         }
-        else if (!SettingsHelper.Settings.Theme.Dark)
+        else if (!Settings.Theme.Dark)
         {
             ParentBorder.Background = new SolidColorBrush(Color.FromArgb(114,132, 132, 132));
         }

+ 3 - 4
src/PicView.Avalonia.Win32/Views/SettingsWindow.axaml.cs

@@ -3,7 +3,6 @@ using Avalonia.Controls;
 using Avalonia.Input;
 using Avalonia.Interactivity;
 using Avalonia.Media;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.Win32.Views;
@@ -13,7 +12,7 @@ public partial class SettingsWindow : Window
     public SettingsWindow()
     {
         InitializeComponent();
-        if (SettingsHelper.Settings.Theme.GlassTheme)
+        if (Settings.Theme.GlassTheme)
         {
             TopWindowBorder.Background = Brushes.Transparent;
             TopWindowBorder.BorderThickness = new Thickness(0);
@@ -40,7 +39,7 @@ public partial class SettingsWindow : Window
             MinimizeButton.Foreground = new SolidColorBrush(color);
             CloseButton.Foreground = new SolidColorBrush(color);
         }
-        else if (!SettingsHelper.Settings.Theme.Dark)
+        else if (!Settings.Theme.Dark)
         {
             ParentBorder.Background = new SolidColorBrush(Color.FromArgb(114,132, 132, 132));
         }
@@ -60,7 +59,7 @@ public partial class SettingsWindow : Window
         Closing += async delegate
         {
             Hide();
-            await SettingsHelper.SaveSettingsAsync();
+            await SaveSettingsAsync();
         };
     }
 

+ 2 - 3
src/PicView.Avalonia.Win32/Views/SingleImageResizeWindow.axaml.cs

@@ -3,7 +3,6 @@ using Avalonia.Controls;
 using Avalonia.Input;
 using Avalonia.Interactivity;
 using Avalonia.Media;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.Win32.Views;
@@ -18,7 +17,7 @@ public partial class SingleImageResizeWindow : Window
 
     private void StartUp()
     {
-        if (SettingsHelper.Settings.Theme.GlassTheme)
+        if (Settings.Theme.GlassTheme)
         {
             IconBorder.Background = Brushes.Transparent;
             IconBorder.BorderThickness = new Thickness(0);
@@ -44,7 +43,7 @@ public partial class SingleImageResizeWindow : Window
             MinimizeButton.Foreground = new SolidColorBrush(color);
             CloseButton.Foreground = new SolidColorBrush(color);
         }
-        else if (!SettingsHelper.Settings.Theme.Dark)
+        else if (!Settings.Theme.Dark)
         {
             ParentBorder.Background = new SolidColorBrush(Color.FromArgb(114, 132, 132, 132));
         }

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

@@ -5,7 +5,6 @@ using PicView.Avalonia.DragAndDrop;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Win32.Views;
 
@@ -66,7 +65,7 @@ public partial class WinMainWindow : Window
             return;
         }
 
-        if (SettingsHelper.Settings.WindowProperties.AutoFit)
+        if (Settings.WindowProperties.AutoFit)
         {
             return;
         }

+ 1 - 2
src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml.cs

@@ -5,7 +5,6 @@ using Avalonia.Media;
 using PicView.Avalonia.DragAndDrop;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Win32.Views;
 
@@ -16,7 +15,7 @@ public partial class WinTitleBar : UserControl
         InitializeComponent();
         Loaded += (_, _) =>
         {
-            if (SettingsHelper.Settings.Theme.GlassTheme)
+            if (Settings.Theme.GlassTheme)
             {
                 TopWindowBorder.Background = Brushes.Transparent;
                 TopWindowBorder.BorderThickness = new Thickness(0);

+ 5 - 6
src/PicView.Avalonia/ColorManagement/BackgroundManager.cs

@@ -1,7 +1,6 @@
 using Avalonia;
 using Avalonia.Media;
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.ColorManagement;
 
@@ -15,7 +14,7 @@ public static class BackgroundManager
     /// Returns a brush corresponding to the current background color choice.
     /// Choices include solid colors, transparency, noise texture, and checkerboard patterns.
     /// </summary>
-    private static Brush BackgroundColorBrush => SettingsHelper.Settings.UIProperties.BgColorChoice switch
+    private static Brush BackgroundColorBrush => Settings.UIProperties.BgColorChoice switch
     {
         0 => new SolidColorBrush(Colors.Transparent),
         1 => GetNoiseTextureBrush(),
@@ -43,12 +42,12 @@ public static class BackgroundManager
         }
 
         // Cycle through background choices (0 to 9)
-        SettingsHelper.Settings.UIProperties.BgColorChoice =
-            (SettingsHelper.Settings.UIProperties.BgColorChoice + 1) % 10;
+        Settings.UIProperties.BgColorChoice =
+            (Settings.UIProperties.BgColorChoice + 1) % 10;
 
         // Update the background in the view model
         vm.ImageBackground = BackgroundColorBrush;
-        vm.BackgroundChoice = SettingsHelper.Settings.UIProperties.BgColorChoice;
+        vm.BackgroundChoice = Settings.UIProperties.BgColorChoice;
     }
 
     /// <summary>
@@ -67,7 +66,7 @@ public static class BackgroundManager
     /// <param name="choice">The background choice to set.</param>
     public static void SetBackground(MainViewModel vm, int choice)
     {
-        SettingsHelper.Settings.UIProperties.BgColorChoice = choice;
+        Settings.UIProperties.BgColorChoice = choice;
         vm.ImageBackground = BackgroundColorBrush;
     }
 

+ 12 - 13
src/PicView.Avalonia/ColorManagement/ColorManager.cs

@@ -1,6 +1,5 @@
 using Avalonia;
 using Avalonia.Media;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.ColorManagement;
 
@@ -15,19 +14,19 @@ public static class ColorManager
     /// <value>
     /// A <see cref="Color"/> value representing the logo accent color.
     /// </value>
-    public static Color GetLogoAccentColor => SettingsHelper.Settings.Theme.ColorTheme switch
+    public static Color GetLogoAccentColor => Settings.Theme.ColorTheme switch
     {
-        0 => SettingsHelper.Settings.Theme.Dark ? Color.FromRgb(255, 240, 90) : Color.FromRgb(225, 210, 80), // Blue
-        2 => SettingsHelper.Settings.Theme.Dark ? Color.FromRgb(255, 237, 38) : Color.FromRgb(250, 180, 38), // Pink
+        0 => Settings.Theme.Dark ? Color.FromRgb(255, 240, 90) : Color.FromRgb(225, 210, 80), // Blue
+        2 => Settings.Theme.Dark ? Color.FromRgb(255, 237, 38) : Color.FromRgb(250, 180, 38), // Pink
         3 => Color.FromRgb(248, 175, 60), // Orange
-        4 => SettingsHelper.Settings.Theme.Dark ? Color.FromRgb(209, 237, 93) : Color.FromRgb(175, 157, 38), // Green
+        4 => Settings.Theme.Dark ? Color.FromRgb(209, 237, 93) : Color.FromRgb(175, 157, 38), // Green
         5 => Color.FromRgb(250, 192, 92), // Red
         6 => Color.FromRgb(254, 172, 150), // Teal
         7 => Color.FromRgb(228, 209, 17), // Aqua
-        8 => SettingsHelper.Settings.Theme.Dark ? Color.FromRgb(255, 253, 42) : Color.FromRgb(226, 180, 224), // Golden
-        9 => SettingsHelper.Settings.Theme.Dark ? Color.FromRgb(237, 184, 135) : Color.FromRgb(226, 141, 223), // Purple
-        10 => SettingsHelper.Settings.Theme.Dark ? Color.FromRgb(255, 253, 66) : Color.FromRgb(215, 200, 70), // Cyan
-        11 => SettingsHelper.Settings.Theme.Dark ? Color.FromRgb(255, 237, 38) : Color.FromRgb(226, 141, 223), // Magenta
+        8 => Settings.Theme.Dark ? Color.FromRgb(255, 253, 42) : Color.FromRgb(226, 180, 224), // Golden
+        9 => Settings.Theme.Dark ? Color.FromRgb(237, 184, 135) : Color.FromRgb(226, 141, 223), // Purple
+        10 => Settings.Theme.Dark ? Color.FromRgb(255, 253, 66) : Color.FromRgb(215, 200, 70), // Cyan
+        11 => Settings.Theme.Dark ? Color.FromRgb(255, 237, 38) : Color.FromRgb(226, 141, 223), // Magenta
         12 => Color.FromRgb(255, 253, 42), // Lime
         _ => throw new ArgumentOutOfRangeException(nameof(GetLogoAccentColor))
     };
@@ -38,7 +37,7 @@ public static class ColorManager
     /// <value>
     /// A <see cref="Color"/> value representing the secondary accent color.
     /// </value>
-    public static Color GetSecondaryAccentColor => SettingsHelper.Settings.Theme.ColorTheme switch
+    public static Color GetSecondaryAccentColor => Settings.Theme.ColorTheme switch
     {
         0 => Color.FromArgb(0xF2, 0x0D, 0x80, 0xEE),  // Blue -> #F200ADEE
         2 => Color.FromArgb(0xF2, 0xFF, 0x86, 0xDB),  // Pink -> #F2FF86DB
@@ -61,7 +60,7 @@ public static class ColorManager
     /// <value>
     /// A <see cref="Color"/> value representing the primary accent color.
     /// </value>
-    public static Color GetPrimaryAccentColor => SettingsHelper.Settings.Theme.ColorTheme switch
+    public static Color GetPrimaryAccentColor => Settings.Theme.ColorTheme switch
     {
         0 => Color.FromRgb(26, 140, 240),  // Blue 
         2 => Color.FromRgb(255, 53, 197),  // Pink
@@ -84,7 +83,7 @@ public static class ColorManager
     /// <param name="colorTheme">The color theme index to apply.</param>
     public static void UpdateAccentColors(int colorTheme)
     {
-        SettingsHelper.Settings.Theme.ColorTheme = colorTheme;
+        Settings.Theme.ColorTheme = colorTheme;
 
         var primaryAccentColor = GetPrimaryAccentColor;
         var secondaryAccentColor = GetSecondaryAccentColor;
@@ -94,7 +93,7 @@ public static class ColorManager
         var secondaryBrush = new SolidColorBrush(secondaryAccentColor);
         var logoAccentBrush = new SolidColorBrush(logoAccentColor);
         
-        if (SettingsHelper.Settings.Theme.GlassTheme)
+        if (Settings.Theme.GlassTheme)
         {
             ThemeManager.GlassThemeUpdates();
         }

+ 10 - 11
src/PicView.Avalonia/ColorManagement/ThemeManager.cs

@@ -1,7 +1,6 @@
 using Avalonia;
 using Avalonia.Media;
 using Avalonia.Styling;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.ColorManagement;
 public static class ThemeManager
@@ -24,23 +23,23 @@ public static class ThemeManager
         switch (theme)
         {
             default:
-                SettingsHelper.Settings.Theme.Dark = true;
-                SettingsHelper.Settings.Theme.GlassTheme = false;
+                Settings.Theme.Dark = true;
+                Settings.Theme.GlassTheme = false;
                 application.RequestedThemeVariant = ThemeVariant.Dark;
                 break;
             case Theme.Light:
-                SettingsHelper.Settings.Theme.Dark = false;
-                SettingsHelper.Settings.Theme.GlassTheme = false;
+                Settings.Theme.Dark = false;
+                Settings.Theme.GlassTheme = false;
                 application.RequestedThemeVariant = ThemeVariant.Light;
                 break;
             case Theme.Glass:
-                SettingsHelper.Settings.Theme.GlassTheme = true;
+                Settings.Theme.GlassTheme = true;
                 application.RequestedThemeVariant = ThemeVariant.Light;
                 GlassThemeUpdates();
                 break;
         }
         
-        ColorManager.UpdateAccentColors(SettingsHelper.Settings.Theme.ColorTheme);
+        ColorManager.UpdateAccentColors(Settings.Theme.ColorTheme);
     }
 
     public static void GlassThemeUpdates()
@@ -77,21 +76,21 @@ public static class ThemeManager
         if (!settingsExists)
         {
             application.RequestedThemeVariant = application.ActualThemeVariant;
-            SettingsHelper.Settings.Theme.Dark = application.RequestedThemeVariant == ThemeVariant.Dark;
+            Settings.Theme.Dark = application.RequestedThemeVariant == ThemeVariant.Dark;
         }
         else
         {
-            if (SettingsHelper.Settings.Theme.GlassTheme)
+            if (Settings.Theme.GlassTheme)
             {
                 application.RequestedThemeVariant = ThemeVariant.Light;
             }
-            else if (SettingsHelper.Settings.Theme.UseSystemTheme)
+            else if (Settings.Theme.UseSystemTheme)
             {
                 application.RequestedThemeVariant = ThemeVariant.Dark; // TODO : Figure out how to get the system theme
             }
             else
             {
-                application.RequestedThemeVariant = SettingsHelper.Settings.Theme.Dark ? ThemeVariant.Dark : ThemeVariant.Light;
+                application.RequestedThemeVariant = Settings.Theme.Dark ? ThemeVariant.Dark : ThemeVariant.Light;
             }
         }
     }

+ 1 - 2
src/PicView.Avalonia/Crop/CropFunctions.cs

@@ -3,7 +3,6 @@ using Avalonia.Media.Imaging;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.Views.UC;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.Crop;
@@ -60,7 +59,7 @@ public static class CropFunctions
             return false;
         }
 
-        if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide)
+        if (Settings.ImageScaling.ShowImageSideBySide)
         {
             return false;
         }

+ 1 - 2
src/PicView.Avalonia/CustomControls/AnimatedPopUp.cs

@@ -6,7 +6,6 @@ using Avalonia.Input;
 using Avalonia.Media;
 using PicView.Avalonia.Animations;
 using PicView.Avalonia.UI;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.CustomControls;
 
@@ -42,7 +41,7 @@ public class AnimatedPopUp : ContentControl
         _partOverlay.Opacity = 0;
         _partBorder.Opacity = 0;
 
-        if (SettingsHelper.Settings.Theme.GlassTheme)
+        if (Settings.Theme.GlassTheme)
         {
             if (Application.Current.TryGetResource("MenuBackgroundColor",
                     Application.Current.RequestedThemeVariant, out var bgColor))

+ 2 - 3
src/PicView.Avalonia/CustomControls/CustomSlider.cs

@@ -1,6 +1,5 @@
 using Avalonia.Controls;
 using Avalonia.Input;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.CustomControls;
 public class CustomSlider : Slider
@@ -14,14 +13,14 @@ public class CustomSlider : Slider
 
     private void CustomSlider_PointerWheelChanged(object? sender, PointerWheelEventArgs e)
     {
-        if (SettingsHelper.Settings.Zoom.IsUsingTouchPad)
+        if (Settings.Zoom.IsUsingTouchPad)
         {
             // Don't scroll unintentionally
             return;
         }
 
         double indexChange;
-        if (SettingsHelper.Settings.Zoom.HorizontalReverseScroll)
+        if (Settings.Zoom.HorizontalReverseScroll)
         {
             indexChange = e.Delta.Y > 0 ? -TickFrequency : TickFrequency;
         }

+ 2 - 3
src/PicView.Avalonia/CustomControls/GalleryAnimationControl.cs

@@ -10,7 +10,6 @@ using PicView.Avalonia.Gallery;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.Gallery;
 using ReactiveUI;
 
@@ -104,7 +103,7 @@ public class GalleryAnimationControl : UserControl
         {
             return;
         }
-        await vm.GalleryItemStretchTask(SettingsHelper.Settings.Gallery.FullGalleryStretchMode);
+        await vm.GalleryItemStretchTask(Settings.Gallery.FullGalleryStretchMode);
         await Dispatcher.UIThread.InvokeAsync(() =>
         {
             IsVisible = true;
@@ -170,7 +169,7 @@ public class GalleryAnimationControl : UserControl
         {
             return;
         }
-        await vm.GalleryItemStretchTask(SettingsHelper.Settings.Gallery.BottomGalleryStretchMode);
+        await vm.GalleryItemStretchTask(Settings.Gallery.BottomGalleryStretchMode);
         await Dispatcher.UIThread.InvokeAsync(() =>
         {
             Height = 0;

+ 2 - 3
src/PicView.Avalonia/CustomControls/GalleryListBox.cs

@@ -7,7 +7,6 @@ using Avalonia.Input;
 using Avalonia.Interactivity;
 using PicView.Avalonia.Gallery;
 using PicView.Avalonia.Views.UC;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.CustomControls;
 
@@ -133,7 +132,7 @@ public class GalleryListBox : ListBox
 
         if (e.Delta.Y > 0)
         {
-            if (SettingsHelper.Settings.Zoom.HorizontalReverseScroll)
+            if (Settings.Zoom.HorizontalReverseScroll)
             {
                 _autoScrollViewer.Offset -= new Vector(speed, speed);
             }
@@ -144,7 +143,7 @@ public class GalleryListBox : ListBox
         }
         else
         {
-            if (SettingsHelper.Settings.Zoom.HorizontalReverseScroll)
+            if (Settings.Zoom.HorizontalReverseScroll)
             {
                 _autoScrollViewer.Offset -= new Vector(-speed, -speed);
             }

+ 2 - 3
src/PicView.Avalonia/CustomControls/IconButton.cs

@@ -4,7 +4,6 @@ using Avalonia.Controls;
 using Avalonia.Media;
 using Avalonia.Metadata;
 using Avalonia.Threading;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.CustomControls;
 
@@ -121,7 +120,7 @@ public class IconButton : RepeatButton
                     continue;
                 }
 
-                if (SettingsHelper.Settings.Theme.GlassTheme)
+                if (Settings.Theme.GlassTheme)
                 {
                     if (!Application.Current.TryGetResource("SecondaryTextColor",
                             Application.Current.RequestedThemeVariant, out var secondaryAccentColor))
@@ -173,7 +172,7 @@ public class IconButton : RepeatButton
             // Revert brush to main text color on pointer exit
             PointerExited += delegate
             {
-                if (SettingsHelper.Settings.Theme.GlassTheme)
+                if (Settings.Theme.GlassTheme)
                 {
 return;
                 }

+ 1 - 2
src/PicView.Avalonia/CustomControls/PicBox.cs

@@ -15,7 +15,6 @@ using PicView.Avalonia.AnimatedImage;
 using PicView.Avalonia.ImageHandling;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 using PicView.Core.Navigation;
 using ReactiveUI;
 using Vector = Avalonia.Vector;
@@ -203,7 +202,7 @@ public class PicBox : Control
     private void RenderBasedOnSettings(DrawingContext context, IImage source)
     {
         var is1To1 = false; // TODO: replace with settings value
-        var isSideBySide = SettingsHelper.Settings.ImageScaling.ShowImageSideBySide;
+        var isSideBySide = Settings.ImageScaling.ShowImageSideBySide;
         var secondarySource = SecondarySource as IImage;
         
         var viewPort = DetermineViewPort();

+ 1 - 2
src/PicView.Avalonia/DragAndDrop/DragAndDropHelper.cs

@@ -11,7 +11,6 @@ using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.Views.UC;
 using PicView.Core.Calculations;
-using PicView.Core.Config;
 using PicView.Core.FileHandling;
 using PicView.Core.ProcessHandling;
 
@@ -70,7 +69,7 @@ public static class DragAndDropHelper
             }
         }
 
-        if (!SettingsHelper.Settings.UIProperties.OpenInSameWindow)
+        if (!Settings.UIProperties.OpenInSameWindow)
         {
             foreach (var file in storageItems.Skip(1))
             {

+ 7 - 8
src/PicView.Avalonia/Gallery/GalleryFunctions.cs

@@ -6,7 +6,6 @@ using PicView.Avalonia.Navigation;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.Views.UC;
-using PicView.Core.Config;
 using PicView.Core.Gallery;
 using PicView.Core.Localization;
 
@@ -283,7 +282,7 @@ public static class GalleryFunctions
         }
 
         UIHelper.CloseMenus(vm);
-        if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+        if (Settings.Gallery.IsBottomGalleryShown)
         {
             // Showing bottom gallery is enabled
             IsBottomGalleryOpen = true;
@@ -321,7 +320,7 @@ public static class GalleryFunctions
         }
 
         _ = Task.Run(() => GalleryLoad.LoadGallery(vm, Path.GetDirectoryName(vm.ImageIterator.ImagePaths[0])));
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
     }
 
     public static async Task OpenCloseBottomGallery(MainViewModel vm)
@@ -333,27 +332,27 @@ public static class GalleryFunctions
 
         UIHelper.CloseMenus(vm);
 
-        if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+        if (Settings.Gallery.IsBottomGalleryShown)
         {
             vm.GalleryMode = GalleryMode.BottomToClosed;
             vm.GetIsShowingBottomGalleryTranslation = TranslationHelper.Translation.ShowBottomGallery;
-            SettingsHelper.Settings.Gallery.IsBottomGalleryShown = false;
+            Settings.Gallery.IsBottomGalleryShown = false;
             IsFullGalleryOpen = false;
             IsBottomGalleryOpen = false;
-            await SettingsHelper.SaveSettingsAsync();
+            await SaveSettingsAsync();
             return;
         }
 
         IsBottomGalleryOpen = true;
         IsFullGalleryOpen = false;
-        SettingsHelper.Settings.Gallery.IsBottomGalleryShown = true;
+        Settings.Gallery.IsBottomGalleryShown = true;
         if (NavigationHelper.CanNavigate(vm))
         {
             vm.GalleryMode = GalleryMode.ClosedToBottom;
         }
 
         vm.GetIsShowingBottomGalleryTranslation = TranslationHelper.Translation.HideBottomGallery;
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
         if (!NavigationHelper.CanNavigate(vm))
         {
             return;

+ 1 - 2
src/PicView.Avalonia/Gallery/GalleryLoad.cs

@@ -5,7 +5,6 @@ using PicView.Avalonia.Navigation;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.Views.UC;
-using PicView.Core.Config;
 using PicView.Core.Gallery;
 
 namespace PicView.Avalonia.Gallery;
@@ -21,7 +20,7 @@ public static class GalleryLoad
         // TODO: Lazy load this when scrolling instead. Figure out how to support virtualization. 
         
         // Make sure height is set
-        if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown && !GalleryFunctions.IsFullGalleryOpen)
+        if (Settings.Gallery.IsBottomGalleryShown && !GalleryFunctions.IsFullGalleryOpen)
         {
             vm.GetGalleryItemHeight = vm.GetBottomGalleryItemHeight;
         }

+ 1 - 2
src/PicView.Avalonia/Gallery/GalleryNavigation.cs

@@ -4,7 +4,6 @@ using PicView.Avalonia.Navigation;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.Views.UC;
-using PicView.Core.Config;
 using PicView.Core.Gallery;
 
 namespace PicView.Avalonia.Gallery;
@@ -49,7 +48,7 @@ public static class GalleryNavigation
 
     public static void CenterScrollToSelectedItem(MainViewModel vm)
     {
-        if (SettingsHelper.Settings.WindowProperties.AutoFit)
+        if (Settings.WindowProperties.AutoFit)
         {
             // Use post to ensure the UI update takes place after resize
             Dispatcher.UIThread.Post(ScrollToSelected);;

+ 18 - 19
src/PicView.Avalonia/Gallery/GalleryStretch.cs

@@ -1,6 +1,5 @@
 using Avalonia.Media;
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Gallery;
 public static class GalleryStretchMode
@@ -32,7 +31,7 @@ public static class GalleryStretchMode
         vm.IsFillSquareBottomChecked = false;
         vm.IsFillSquareFullChecked = false;
 
-        if (SettingsHelper.Settings.Gallery.FullGalleryStretchMode.Equals("Square", StringComparison.OrdinalIgnoreCase))
+        if (Settings.Gallery.FullGalleryStretchMode.Equals("Square", StringComparison.OrdinalIgnoreCase))
         {
             vm.IsSquareFullChecked = true;
             if (GalleryFunctions.IsFullGalleryOpen)
@@ -41,7 +40,7 @@ public static class GalleryStretchMode
                 SetSquareStretch(vm);
             }
         }
-        else if (SettingsHelper.Settings.Gallery.FullGalleryStretchMode.Equals("FillSquare", StringComparison.OrdinalIgnoreCase))
+        else if (Settings.Gallery.FullGalleryStretchMode.Equals("FillSquare", StringComparison.OrdinalIgnoreCase))
         {
             vm.IsFillSquareFullChecked = true;
             if (GalleryFunctions.IsFullGalleryOpen)
@@ -50,7 +49,7 @@ public static class GalleryStretchMode
                 SetSquareFillStretch(vm);
             }
         }
-        else if (Enum.TryParse<Stretch>(SettingsHelper.Settings.Gallery.FullGalleryStretchMode, out var stretchMode))
+        else if (Enum.TryParse<Stretch>(Settings.Gallery.FullGalleryStretchMode, out var stretchMode))
         {
             SetStretchIsChecked(stretchMode, true);
             if (GalleryFunctions.IsFullGalleryOpen)
@@ -70,7 +69,7 @@ public static class GalleryStretchMode
         }
         
 
-        if (SettingsHelper.Settings.Gallery.BottomGalleryStretchMode.Equals("Square", StringComparison.OrdinalIgnoreCase))
+        if (Settings.Gallery.BottomGalleryStretchMode.Equals("Square", StringComparison.OrdinalIgnoreCase))
         {
             vm.IsSquareBottomChecked = true;
             if (!GalleryFunctions.IsFullGalleryOpen)
@@ -79,7 +78,7 @@ public static class GalleryStretchMode
                 SetSquareStretch(vm);
             }
         }
-        else if (SettingsHelper.Settings.Gallery.BottomGalleryStretchMode.Equals("FillSquare", StringComparison.OrdinalIgnoreCase))
+        else if (Settings.Gallery.BottomGalleryStretchMode.Equals("FillSquare", StringComparison.OrdinalIgnoreCase))
         {
             vm.IsFillSquareBottomChecked = true;
             if (!GalleryFunctions.IsFullGalleryOpen)
@@ -88,7 +87,7 @@ public static class GalleryStretchMode
                 SetSquareFillStretch(vm);
             }
         }
-        else if (Enum.TryParse<Stretch>(SettingsHelper.Settings.Gallery.BottomGalleryStretchMode, out var stretchMode))
+        else if (Enum.TryParse<Stretch>(Settings.Gallery.BottomGalleryStretchMode, out var stretchMode))
         {
             SetStretchIsChecked(stretchMode, false);
             if (!GalleryFunctions.IsFullGalleryOpen)
@@ -219,47 +218,47 @@ public static class GalleryStretchMode
     {
         SetGalleryStretch(vm, stretch);
         
-        SettingsHelper.Settings.Gallery.BottomGalleryStretchMode = stretch.ToString();
-        await SettingsHelper.SaveSettingsAsync();
+        Settings.Gallery.BottomGalleryStretchMode = stretch.ToString();
+        await SaveSettingsAsync();
     }
     
     public static async Task ChangeFullGalleryItemStretch(MainViewModel vm, Stretch stretch)
     {
         SetGalleryStretch(vm, stretch);
         
-        SettingsHelper.Settings.Gallery.FullGalleryStretchMode = stretch.ToString();
-        await SettingsHelper.SaveSettingsAsync();
+        Settings.Gallery.FullGalleryStretchMode = stretch.ToString();
+        await SaveSettingsAsync();
     }
     
     public static async Task ChangeBottomGalleryStretchSquare(MainViewModel vm)
     {
         SetSquareStretch(vm);
         
-        SettingsHelper.Settings.Gallery.BottomGalleryStretchMode = "Square";
-        await SettingsHelper.SaveSettingsAsync();
+        Settings.Gallery.BottomGalleryStretchMode = "Square";
+        await SaveSettingsAsync();
     }
     
     public static async Task ChangeBottomGalleryStretchSquareFill(MainViewModel vm)
     {
         SetSquareFillStretch(vm);
         
-        SettingsHelper.Settings.Gallery.BottomGalleryStretchMode = "FillSquare";
-        await SettingsHelper.SaveSettingsAsync();
+        Settings.Gallery.BottomGalleryStretchMode = "FillSquare";
+        await SaveSettingsAsync();
     }
 
     public static async Task ChangeFullGalleryStretchSquare(MainViewModel vm)
     {
         SetSquareStretch(vm);
         
-        SettingsHelper.Settings.Gallery.FullGalleryStretchMode = "Square";
-        await SettingsHelper.SaveSettingsAsync();
+        Settings.Gallery.FullGalleryStretchMode = "Square";
+        await SaveSettingsAsync();
     }
     
     public static async Task ChangeFullGalleryStretchSquareFill(MainViewModel vm)
     {
         SetSquareFillStretch(vm);
         
-        SettingsHelper.Settings.Gallery.FullGalleryStretchMode = "FillSquare";
-        await SettingsHelper.SaveSettingsAsync();
+        Settings.Gallery.FullGalleryStretchMode = "FillSquare";
+        await SaveSettingsAsync();
     }
 }

+ 1 - 0
src/PicView.Avalonia/GlobalUsings.cs

@@ -0,0 +1 @@
+global using static PicView.Core.Config.SettingsHelper;

+ 2 - 3
src/PicView.Avalonia/ImageTransformations/Rotation.cs

@@ -5,7 +5,6 @@ using PicView.Avalonia.Gallery;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.Views.UC.Menus;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.ImageTransformations;
 public static class Rotation
@@ -37,7 +36,7 @@ public static class Rotation
         await RotateRight(vm);
         
         // Check if it should move the cursor
-        if (!SettingsHelper.Settings.WindowProperties.AutoFit)
+        if (!Settings.WindowProperties.AutoFit)
         {
             return;
         }
@@ -109,7 +108,7 @@ public static class Rotation
         await RotateLeft(vm);
         
         // Check if it should move the cursor
-        if (!SettingsHelper.Settings.WindowProperties.AutoFit)
+        if (!Settings.WindowProperties.AutoFit)
         {
             return;
         }

+ 2 - 3
src/PicView.Avalonia/Navigation/ErrorHandling.cs

@@ -6,7 +6,6 @@ using PicView.Avalonia.Gallery;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Core.Calculations;
-using PicView.Core.Config;
 using PicView.Core.FileHandling;
 using PicView.Core.Gallery;
 using StartUpMenu = PicView.Avalonia.Views.StartUpMenu;
@@ -37,11 +36,11 @@ public static class ErrorHandling
             if (vm.CurrentView is not StartUpMenu)
             {
                 var startUpMenu = new StartUpMenu();
-                if (SettingsHelper.Settings.WindowProperties.AutoFit)
+                if (Settings.WindowProperties.AutoFit)
                 {
                     startUpMenu.Width = SizeDefaults.WindowMinSize;
                     startUpMenu.Height = SizeDefaults.WindowMinSize;
-                    if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+                    if (Settings.Gallery.IsBottomGalleryShown)
                     {
                         vm.GalleryWidth = SizeDefaults.WindowMinSize;
                     }

+ 4 - 5
src/PicView.Avalonia/Navigation/FileHistoryNavigation.cs

@@ -1,5 +1,4 @@
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 using PicView.Core.Navigation;
 
 namespace PicView.Avalonia.Navigation;
@@ -73,9 +72,9 @@ public static class FileHistoryNavigation
         
         async Task LoadLastFileFromSettingsOrNotAsync()
         {
-            if (!string.IsNullOrWhiteSpace(SettingsHelper.Settings.StartUp.LastFile))
+            if (!string.IsNullOrWhiteSpace(Settings.StartUp.LastFile))
             {
-                await NavigationHelper.LoadPicFromStringAsync(SettingsHelper.Settings.StartUp.LastFile, vm);
+                await NavigationHelper.LoadPicFromStringAsync(Settings.StartUp.LastFile, vm);
             }
             else
             {
@@ -128,11 +127,11 @@ public static class FileHistoryNavigation
         string? nextEntry;
         if (next)
         {
-            nextEntry = await Task.FromResult(_fileHistory.GetNextEntry(SettingsHelper.Settings.UIProperties.Looping, index, imagePaths)).ConfigureAwait(false);
+            nextEntry = await Task.FromResult(_fileHistory.GetNextEntry(Settings.UIProperties.Looping, index, imagePaths)).ConfigureAwait(false);
         }
         else
         {
-            nextEntry = await Task.FromResult(_fileHistory.GetPreviousEntry(SettingsHelper.Settings.UIProperties.Looping, index, imagePaths)).ConfigureAwait(false);
+            nextEntry = await Task.FromResult(_fileHistory.GetPreviousEntry(Settings.UIProperties.Looping, index, imagePaths)).ConfigureAwait(false);
         }
 
         if (string.IsNullOrWhiteSpace(nextEntry))

+ 8 - 9
src/PicView.Avalonia/Navigation/FileListManager.cs

@@ -4,7 +4,6 @@ using PicView.Avalonia.Gallery;
 using PicView.Avalonia.Interfaces;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 using PicView.Core.FileHandling;
 
 namespace PicView.Avalonia.Navigation;
@@ -20,7 +19,7 @@ public static class FileListManager
             default:
             case FileListHelper.SortFilesBy.Name: // Alphanumeric sort
                 var list = files.ToList();
-                if (SettingsHelper.Settings.Sorting.Ascending)
+                if (Settings.Sorting.Ascending)
                 {
                     list.Sort(platformService.CompareStrings);
                 }
@@ -33,31 +32,31 @@ public static class FileListManager
 
             case FileListHelper.SortFilesBy.FileSize: // Sort by file size
                 var fileInfoList = files.Select(f => new FileInfo(f)).ToList();
-                var sortedBySize = SettingsHelper.Settings.Sorting.Ascending
+                var sortedBySize = Settings.Sorting.Ascending
                     ? fileInfoList.OrderBy(f => f.Length)
                     : fileInfoList.OrderByDescending(f => f.Length);
                 return sortedBySize.Select(f => f.FullName).ToList();
 
             case FileListHelper.SortFilesBy.Extension: // Sort by file extension
-                var sortedByExtension = SettingsHelper.Settings.Sorting.Ascending
+                var sortedByExtension = Settings.Sorting.Ascending
                     ? files.OrderBy(Path.GetExtension)
                     : files.OrderByDescending(Path.GetExtension);
                 return sortedByExtension.ToList();
 
             case FileListHelper.SortFilesBy.CreationTime: // Sort by file creation time
-                var sortedByCreationTime = SettingsHelper.Settings.Sorting.Ascending
+                var sortedByCreationTime = Settings.Sorting.Ascending
                     ? files.OrderBy(f => new FileInfo(f).CreationTime)
                     : files.OrderByDescending(f => new FileInfo(f).CreationTime);
                 return sortedByCreationTime.ToList();
 
             case FileListHelper.SortFilesBy.LastAccessTime: // Sort by file last access time
-                var sortedByLastAccessTime = SettingsHelper.Settings.Sorting.Ascending
+                var sortedByLastAccessTime = Settings.Sorting.Ascending
                     ? files.OrderBy(f => new FileInfo(f).LastAccessTime)
                     : files.OrderByDescending(f => new FileInfo(f).LastAccessTime);
                 return sortedByLastAccessTime.ToList();
 
             case FileListHelper.SortFilesBy.LastWriteTime: // Sort by file last write time
-                var sortedByLastWriteTime = SettingsHelper.Settings.Sorting.Ascending
+                var sortedByLastWriteTime = Settings.Sorting.Ascending
                     ? files.OrderBy(f => new FileInfo(f).LastWriteTime)
                     : files.OrderByDescending(f => new FileInfo(f).LastWriteTime);
                 return sortedByLastWriteTime.ToList();
@@ -69,7 +68,7 @@ public static class FileListManager
     
     public static async Task UpdateFileList(IPlatformSpecificService? platformSpecificService, MainViewModel vm, FileListHelper.SortFilesBy sortFilesBy)
     {
-        SettingsHelper.Settings.Sorting.SortPreference = (int)sortFilesBy;
+        Settings.Sorting.SortPreference = (int)sortFilesBy;
         if (!NavigationHelper.CanNavigate(vm))
         {
             return;
@@ -95,7 +94,7 @@ public static class FileListManager
 
     public static async Task UpdateFileList(IPlatformSpecificService? platformSpecificService, MainViewModel vm, bool ascending)
     {
-        SettingsHelper.Settings.Sorting.Ascending = ascending;
+        Settings.Sorting.Ascending = ascending;
         if (!NavigationHelper.CanNavigate(vm))
         {
             return;

+ 10 - 11
src/PicView.Avalonia/Navigation/ImageIterator.cs

@@ -6,7 +6,6 @@ using PicView.Avalonia.Input;
 using PicView.Avalonia.Preloading;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 using PicView.Core.FileHandling;
 using PicView.Core.Gallery;
 using PicView.Core.Navigation;
@@ -76,7 +75,7 @@ public sealed class ImageIterator : IDisposable
         _watcher.Path = fileInfo.DirectoryName;
         _watcher.EnableRaisingEvents = true;
         _watcher.Filter = "*.*";
-        _watcher.IncludeSubdirectories = SettingsHelper.Settings.Sorting.IncludeSubDirectories;
+        _watcher.IncludeSubdirectories = Settings.Sorting.IncludeSubDirectories;
         _watcher.Created += async (_, e) => await OnFileAdded(e);
         _watcher.Deleted += async (_, e) => await OnFileDeleted(e);
         _watcher.Renamed += async (_, e) => await OnFileRenamed(e);
@@ -109,7 +108,7 @@ public sealed class ImageIterator : IDisposable
 
         IsRunning = true;
 
-        var sourceFileInfo = SettingsHelper.Settings.Sorting.IncludeSubDirectories
+        var sourceFileInfo = Settings.Sorting.IncludeSubDirectories
             ? new FileInfo(_watcher.Path)
             : fileInfo;
 
@@ -165,7 +164,7 @@ public sealed class ImageIterator : IDisposable
         var isGalleryItemAdded = await GalleryFunctions.AddGalleryItem(index, fileInfo, _vm);
         if (isGalleryItemAdded)
         {
-            if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown && ImagePaths.Count > 1)
+            if (Settings.Gallery.IsBottomGalleryShown && ImagePaths.Count > 1)
             {
                 if (_vm.GalleryMode is GalleryMode.BottomToClosed or GalleryMode.FullToClosed)
                 {
@@ -235,7 +234,7 @@ public sealed class ImageIterator : IDisposable
         var removed = GalleryFunctions.RemoveGalleryItem(index, _vm);
         if (removed)
         {
-            if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+            if (Settings.Gallery.IsBottomGalleryShown)
             {
                 if (ImagePaths.Count == 1)
                 {
@@ -283,7 +282,7 @@ public sealed class ImageIterator : IDisposable
             return;
         }
 
-        var sourceFileInfo = SettingsHelper.Settings.Sorting.IncludeSubDirectories
+        var sourceFileInfo = Settings.Sorting.IncludeSubDirectories
             ? new FileInfo(_watcher.Path)
             : fileInfo;
         var newList = FileListHelper.RetrieveFiles(sourceFileInfo).ToList();
@@ -432,7 +431,7 @@ public sealed class ImageIterator : IDisposable
                 var indexChange = navigateTo == NavigateTo.Next ? skipAmount : -skipAmount;
                 IsReversed = navigateTo == NavigateTo.Previous;
 
-                if (SettingsHelper.Settings.UIProperties.Looping)
+                if (Settings.UIProperties.Looping)
                 {
                     // Calculate new index with looping
                     next = (index + indexChange + ImagePaths.Count) % ImagePaths.Count;
@@ -476,7 +475,7 @@ public sealed class ImageIterator : IDisposable
     public async Task NextIteration(NavigateTo navigateTo, CancellationTokenSource cts)
     {
         var index = GetIteration(CurrentIndex, navigateTo,
-            SettingsHelper.Settings.ImageScaling.ShowImageSideBySide);
+            Settings.ImageScaling.ShowImageSideBySide);
         if (index < 0)
         {
             return;
@@ -544,7 +543,7 @@ public sealed class ImageIterator : IDisposable
                 return;
             }
 
-            if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide)
+            if (Settings.ImageScaling.ShowImageSideBySide)
             {
                 var nextIndex = GetIteration(index, IsReversed ? NavigateTo.Previous : NavigateTo.Next);
                 var nextPreloadValue = await PreLoader.GetAsync(nextIndex, ImagePaths);
@@ -578,7 +577,7 @@ public sealed class ImageIterator : IDisposable
 
             if (ImagePaths.Count > 1)
             {
-                if (SettingsHelper.Settings.UIProperties.IsTaskbarProgressEnabled)
+                if (Settings.UIProperties.IsTaskbarProgressEnabled)
                 {
                     await Dispatcher.UIThread.InvokeAsync(() =>
                     {
@@ -651,7 +650,7 @@ public sealed class ImageIterator : IDisposable
             return;
         }
 
-        _timer.Interval = TimeSpan.FromSeconds(SettingsHelper.Settings.UIProperties.NavSpeed).TotalMilliseconds;
+        _timer.Interval = TimeSpan.FromSeconds(Settings.UIProperties.NavSpeed).TotalMilliseconds;
         _timer.Start();
         await IterateToIndex(index, cts).ConfigureAwait(false);
     }

+ 9 - 10
src/PicView.Avalonia/Navigation/NavigationHelper.cs

@@ -11,7 +11,6 @@ using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
 using PicView.Core.ArchiveHandling;
-using PicView.Core.Config;
 using PicView.Core.Gallery;
 using PicView.Core.ImageDecoding;
 using PicView.Core.Localization;
@@ -375,7 +374,7 @@ public static class NavigationHelper
         }
         else
         {
-            if (SettingsHelper.Settings.UIProperties.IsTaskbarProgressEnabled)
+            if (Settings.UIProperties.IsTaskbarProgressEnabled)
             {
                 vm.PlatformService.StopTaskbarProgress();
             }
@@ -465,7 +464,7 @@ public static class NavigationHelper
                 vm.Title = displayProgress;
                 vm.TitleTooltip = displayProgress;
                 vm.WindowTitle = displayProgress;
-                if (SettingsHelper.Settings.UIProperties.IsTaskbarProgressEnabled)
+                if (Settings.UIProperties.IsTaskbarProgressEnabled)
                 {
                     vm.PlatformService.SetTaskbarProgress((ulong)totalBytesDownloaded, (ulong)totalFileSize);
                 }
@@ -571,7 +570,7 @@ public static class NavigationHelper
 
         _cancellationTokenSource = new CancellationTokenSource();
 
-        if (SettingsHelper.Settings.UIProperties.IsTaskbarProgressEnabled)
+        if (Settings.UIProperties.IsTaskbarProgressEnabled)
         {
             vm.PlatformService.StopTaskbarProgress();
         }
@@ -582,9 +581,9 @@ public static class NavigationHelper
         if (fileList.Count <= 0)
         {
             // Attempt to reload with subdirectories and reset the setting
-            if (!SettingsHelper.Settings.Sorting.IncludeSubDirectories)
+            if (!Settings.Sorting.IncludeSubDirectories)
             {
-                SettingsHelper.Settings.Sorting.IncludeSubDirectories = true;
+                Settings.Sorting.IncludeSubDirectories = true;
                 fileList = await Task.FromResult(vm.PlatformService.GetFiles(fileInfo)).ConfigureAwait(false);
                 if (fileList.Count <= 0)
                 {
@@ -592,7 +591,7 @@ public static class NavigationHelper
                     return;
                 }
 
-                SettingsHelper.Settings.Sorting.IncludeSubDirectories = false;
+                Settings.Sorting.IncludeSubDirectories = false;
             }
             else
             {
@@ -667,7 +666,7 @@ public static class NavigationHelper
             var parentFolder = Path.GetDirectoryName(currentFolder);
             var directories = Directory.GetDirectories(parentFolder, "*", SearchOption.TopDirectoryOnly);
             var directoryIndex = Array.IndexOf(directories, currentFolder);
-            if (SettingsHelper.Settings.UIProperties.Looping)
+            if (Settings.UIProperties.Looping)
             {
                 directoryIndex = (directoryIndex + indexChange + directories.Length) % directories.Length;
             }
@@ -734,7 +733,7 @@ public static class NavigationHelper
     /// <returns>A task representing the asynchronous operation.</returns>
     private static async Task CheckAndReloadGallery(FileInfo fileInfo, MainViewModel vm)
     {
-        if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown || GalleryFunctions.IsFullGalleryOpen)
+        if (Settings.Gallery.IsBottomGalleryShown || GalleryFunctions.IsFullGalleryOpen)
         {
             GalleryFunctions.Clear();
 
@@ -779,7 +778,7 @@ public static class NavigationHelper
     /// <returns>A task representing the asynchronous operation.</returns>
     private static async Task ScrollToEndIfNecessary(bool last)
     {
-        if (last && SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+        if (last && Settings.Gallery.IsBottomGalleryShown)
         {
             await Dispatcher.UIThread.InvokeAsync(() => { UIHelper.GetGalleryView.GalleryListBox.ScrollToEnd(); });
         }

+ 6 - 7
src/PicView.Avalonia/Navigation/Slideshow.cs

@@ -5,7 +5,6 @@ using PicView.Avalonia.Input;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.Gallery;
 using Timer = System.Timers.Timer;
 
@@ -23,7 +22,7 @@ public static class Slideshow
             return;
         }
         
-        await Start(vm, TimeSpan.FromSeconds(SettingsHelper.Settings.UIProperties.SlideShowTimer).TotalMilliseconds);
+        await Start(vm, TimeSpan.FromSeconds(Settings.UIProperties.SlideShowTimer).TotalMilliseconds);
     }
 
     public static async Task StartSlideshow(MainViewModel vm, int milliseconds)
@@ -43,16 +42,16 @@ public static class Slideshow
             return;
         }
 
-        if (!SettingsHelper.Settings.WindowProperties.Fullscreen)
+        if (!Settings.WindowProperties.Fullscreen)
         {
             WindowFunctions.Restore(vm, Application.Current?.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime);
-            if (SettingsHelper.Settings.WindowProperties.AutoFit)
+            if (Settings.WindowProperties.AutoFit)
             {
                 WindowFunctions.CenterWindowOnScreen();
             }
         }
 
-        if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+        if (Settings.Gallery.IsBottomGalleryShown)
         {
             vm.GalleryMode = GalleryMode.ClosedToBottom;
         }
@@ -106,12 +105,12 @@ public static class Slideshow
 
         UIHelper.CloseMenus(vm);
 
-        if (!SettingsHelper.Settings.WindowProperties.Fullscreen)
+        if (!Settings.WindowProperties.Fullscreen)
         {
             await WindowFunctions.ToggleFullscreen(vm, false);
         }
 
-        if (GalleryFunctions.IsFullGalleryOpen || SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+        if (GalleryFunctions.IsFullGalleryOpen || Settings.Gallery.IsBottomGalleryShown)
         {
             vm.GalleryMode = GalleryMode.BottomToClosed;
         }

+ 7 - 8
src/PicView.Avalonia/Navigation/UpdateImage.cs

@@ -8,7 +8,6 @@ using PicView.Avalonia.Preloading;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.Gallery;
 using PicView.Core.Navigation;
 
@@ -29,7 +28,7 @@ public static class UpdateImage
             preLoadValue.ImageModel = await GetImageModel.GetImageModelAsync(fileInfo).ConfigureAwait(false);
         }
 
-        if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide)
+        if (Settings.ImageScaling.ShowImageSideBySide)
         {
             nextPreloadValue ??= await vm.ImageIterator.GetNextPreLoadValueAsync().ConfigureAwait(false);
             if (nextPreloadValue.ImageModel?.Image is null && index == vm.ImageIterator.CurrentIndex)
@@ -54,7 +53,7 @@ public static class UpdateImage
                 return;
             }
             vm.ImageViewer.SetTransform(preLoadValue.ImageModel.EXIFOrientation);
-            if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide)
+            if (Settings.ImageScaling.ShowImageSideBySide)
             {
                 vm.SecondaryImageSource = nextPreloadValue.ImageModel.Image;
             }
@@ -76,7 +75,7 @@ public static class UpdateImage
 
         vm.IsLoading = false;
 
-        if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide)
+        if (Settings.ImageScaling.ShowImageSideBySide)
         {
             SetTitleHelper.SetSideBySideTitle(vm, preLoadValue.ImageModel, nextPreloadValue?.ImageModel);
         }
@@ -85,7 +84,7 @@ public static class UpdateImage
             SetTitleHelper.SetTitle(vm, preLoadValue.ImageModel);
         }
         
-        if (SettingsHelper.Settings.WindowProperties.KeepCentered)
+        if (Settings.WindowProperties.KeepCentered)
         {
             await Dispatcher.UIThread.InvokeAsync(() => { WindowFunctions.CenterWindowOnScreen(); });
         }
@@ -93,7 +92,7 @@ public static class UpdateImage
         if (vm.SelectedGalleryItemIndex != index)
         {
             vm.SelectedGalleryItemIndex = index;
-            if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+            if (Settings.Gallery.IsBottomGalleryShown)
             {
                 GalleryNavigation.CenterScrollToSelectedItem(vm);
             }
@@ -106,7 +105,7 @@ public static class UpdateImage
         vm.FileInfo = preLoadValue.ImageModel.FileInfo;
         vm.ZoomValue = 1;
         
-        if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide)
+        if (Settings.ImageScaling.ShowImageSideBySide)
         {
             // Fixes incorrect rendering in the side by side view
             // TODO: Improve and fix side by side and remove this hack 
@@ -194,7 +193,7 @@ public static class UpdateImage
     public static void LoadingPreview(MainViewModel vm, int index)
     {
         vm.SelectedGalleryItemIndex = index;
-        if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+        if (Settings.Gallery.IsBottomGalleryShown)
         {
             GalleryNavigation.CenterScrollToSelectedItem(vm);
         }

+ 8 - 9
src/PicView.Avalonia/SettingsManagement/LanguageUpdater.cs

@@ -1,5 +1,4 @@
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.SettingsManagement;
@@ -10,7 +9,7 @@ public static class LanguageUpdater
     {
         if (settingsExists)
         {
-            await TranslationHelper.LoadLanguage(SettingsHelper.Settings.UIProperties.UserLanguage).ConfigureAwait(false);
+            await TranslationHelper.LoadLanguage(Settings.UIProperties.UserLanguage).ConfigureAwait(false);
         }
         else
         {
@@ -21,32 +20,32 @@ public static class LanguageUpdater
 
         vm.GetIsFlippedTranslation = vm.ScaleX == 1 ? vm.Flip : vm.UnFlip;
         
-        vm.GetIsShowingUITranslation = !SettingsHelper.Settings.UIProperties.ShowInterface ? vm.ShowUI : vm.HideUI;
+        vm.GetIsShowingUITranslation = !Settings.UIProperties.ShowInterface ? vm.ShowUI : vm.HideUI;
         
-        vm.GetIsScrollingTranslation = SettingsHelper.Settings.Zoom.ScrollEnabled ?
+        vm.GetIsScrollingTranslation = Settings.Zoom.ScrollEnabled ?
             TranslationHelper.Translation.ScrollingEnabled : TranslationHelper.Translation.ScrollingDisabled;
         
         vm.GetIsShowingBottomGalleryTranslation = vm.IsGalleryShown ?
             TranslationHelper.Translation.HideBottomGallery :
             TranslationHelper.Translation.ShowBottomGallery;
         
-        vm.GetIsLoopingTranslation = SettingsHelper.Settings.UIProperties.Looping
+        vm.GetIsLoopingTranslation = Settings.UIProperties.Looping
             ? TranslationHelper.Translation.LoopingEnabled
             : TranslationHelper.Translation.LoopingDisabled;
         
-        vm.GetIsCtrlZoomTranslation = SettingsHelper.Settings.Zoom.CtrlZoom
+        vm.GetIsCtrlZoomTranslation = Settings.Zoom.CtrlZoom
             ? TranslationHelper.Translation.CtrlToZoom
             : TranslationHelper.Translation.ScrollToZoom;
         
-        vm.GetIsShowingBottomToolbarTranslation = SettingsHelper.Settings.UIProperties.ShowBottomNavBar
+        vm.GetIsShowingBottomToolbarTranslation = Settings.UIProperties.ShowBottomNavBar
             ? TranslationHelper.Translation.HideBottomToolbar
             : TranslationHelper.Translation.ShowBottomToolbar;
         
-        vm.GetIsShowingFadingUIButtonsTranslation = SettingsHelper.Settings.UIProperties.ShowAltInterfaceButtons
+        vm.GetIsShowingFadingUIButtonsTranslation = Settings.UIProperties.ShowAltInterfaceButtons
             ? TranslationHelper.Translation.DisableFadeInButtonsOnHover
             : TranslationHelper.Translation.ShowFadeInButtonsOnHover;
         
-        vm.GetIsUsingTouchpadTranslation = SettingsHelper.Settings.Zoom.IsUsingTouchPad
+        vm.GetIsUsingTouchpadTranslation = Settings.Zoom.IsUsingTouchPad
             ? TranslationHelper.Translation.UsingTouchpad
             : TranslationHelper.Translation.UsingMouse;
     }

+ 36 - 37
src/PicView.Avalonia/SettingsManagement/SettingsUpdater.cs

@@ -8,7 +8,6 @@ using PicView.Avalonia.Navigation;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.Gallery;
 using PicView.Core.Localization;
 
@@ -21,8 +20,8 @@ public static class SettingsUpdater
 
         try
         {
-            SettingsHelper.DeleteSettingFiles();
-            SettingsHelper.SetDefaults();
+            DeleteSettingFiles();
+            SetDefaults();
 
             ThemeManager.DetermineTheme(Application.Current, false);
         
@@ -38,14 +37,14 @@ public static class SettingsUpdater
             vm.GetBottomGalleryItemHeight = GalleryDefaults.DefaultBottomGalleryHeight;
             vm.GetFullGalleryItemHeight = GalleryDefaults.DefaultFullGalleryHeight;
         
-            if (string.IsNullOrWhiteSpace(SettingsHelper.Settings.Gallery.BottomGalleryStretchMode))
+            if (string.IsNullOrWhiteSpace(Settings.Gallery.BottomGalleryStretchMode))
             {
-                SettingsHelper.Settings.Gallery.BottomGalleryStretchMode = "UniformToFill";
+                Settings.Gallery.BottomGalleryStretchMode = "UniformToFill";
             }
 
-            if (string.IsNullOrWhiteSpace(SettingsHelper.Settings.Gallery.FullGalleryStretchMode))
+            if (string.IsNullOrWhiteSpace(Settings.Gallery.FullGalleryStretchMode))
             {
-                SettingsHelper.Settings.Gallery.FullGalleryStretchMode = "UniformToFill";
+                Settings.Gallery.FullGalleryStretchMode = "UniformToFill";
             }
         
             await TurnOffSubdirectories(vm);
@@ -66,7 +65,7 @@ public static class SettingsUpdater
                 WindowResizing.SetSize(vm);
             });
             
-            await SettingsHelper.SaveSettingsAsync();
+            await SaveSettingsAsync();
         }
         finally
         {
@@ -77,7 +76,7 @@ public static class SettingsUpdater
 
     public static async Task ToggleUsingTouchpad(MainViewModel vm)
     {
-        if (SettingsHelper.Settings.Zoom.IsUsingTouchPad)
+        if (Settings.Zoom.IsUsingTouchPad)
         {
             TurnOffUsingTouchpad(vm);
         }
@@ -86,26 +85,26 @@ public static class SettingsUpdater
             TurnOnUsingTouchpad(vm);
         }
     
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
     }
     
     public static void TurnOffUsingTouchpad(MainViewModel vm)
     {
-        SettingsHelper.Settings.Zoom.IsUsingTouchPad = false;
+        Settings.Zoom.IsUsingTouchPad = false;
         vm.GetIsUsingTouchpadTranslation = TranslationHelper.Translation.UsingMouse;
         vm.IsUsingTouchpad = false;
     }
     
     public static void TurnOnUsingTouchpad(MainViewModel vm)
     {
-        SettingsHelper.Settings.Zoom.IsUsingTouchPad = true;
+        Settings.Zoom.IsUsingTouchPad = true;
         vm.GetIsUsingTouchpadTranslation = TranslationHelper.Translation.UsingTouchpad;
         vm.IsUsingTouchpad = true;
     }
     
     public static async Task ToggleSubdirectories(MainViewModel vm)
     {
-        if (SettingsHelper.Settings.Sorting.IncludeSubDirectories)
+        if (Settings.Sorting.IncludeSubDirectories)
         {
             await TurnOffSubdirectories(vm);
         }
@@ -113,13 +112,13 @@ public static class SettingsUpdater
         {
             await TurnOnSubdirectories(vm);
         }
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
     }
     
     public static async Task TurnOffSubdirectories(MainViewModel vm)
     {
         vm.IsIncludingSubdirectories = false;
-        SettingsHelper.Settings.Sorting.IncludeSubDirectories = false;
+        Settings.Sorting.IncludeSubDirectories = false;
         
         await vm.ImageIterator.ReloadFileList();
         SetTitleHelper.SetTitle(vm);
@@ -128,7 +127,7 @@ public static class SettingsUpdater
     public static async Task TurnOnSubdirectories(MainViewModel vm)
     {
         vm.IsIncludingSubdirectories = true;
-        SettingsHelper.Settings.Sorting.IncludeSubDirectories = true;
+        Settings.Sorting.IncludeSubDirectories = true;
         
         await vm.ImageIterator.ReloadFileList();
         SetTitleHelper.SetTitle(vm);
@@ -136,9 +135,9 @@ public static class SettingsUpdater
     
     public static async Task ToggleTaskbarProgress(MainViewModel vm)
     {
-        if (SettingsHelper.Settings.UIProperties.IsTaskbarProgressEnabled)
+        if (Settings.UIProperties.IsTaskbarProgressEnabled)
         {
-            SettingsHelper.Settings.UIProperties.IsTaskbarProgressEnabled = false;
+            Settings.UIProperties.IsTaskbarProgressEnabled = false;
             await Dispatcher.UIThread.InvokeAsync(() =>
             {
                 vm.PlatformService.StopTaskbarProgress();
@@ -146,7 +145,7 @@ public static class SettingsUpdater
         }
         else
         {
-            SettingsHelper.Settings.UIProperties.IsTaskbarProgressEnabled = true;
+            Settings.UIProperties.IsTaskbarProgressEnabled = true;
             if (NavigationHelper.CanNavigate(vm))
             {
                 await Dispatcher.UIThread.InvokeAsync(() =>
@@ -157,7 +156,7 @@ public static class SettingsUpdater
             }
         }
 
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
     }
     
     #region Image settings
@@ -169,7 +168,7 @@ public static class SettingsUpdater
             return;
         }
         
-        if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide)
+        if (Settings.ImageScaling.ShowImageSideBySide)
         {
             TurnOffSideBySide(vm);
         }
@@ -178,12 +177,12 @@ public static class SettingsUpdater
             await TurnOnSideBySide(vm);
         }
 
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
     }
 
     public static void TurnOffSideBySide(MainViewModel vm)
     {
-        SettingsHelper.Settings.ImageScaling.ShowImageSideBySide = false;
+        Settings.ImageScaling.ShowImageSideBySide = false;
         vm.IsShowingSideBySide = false;
         vm.SecondaryImageSource = null;
         WindowResizing.SetSize(vm);
@@ -191,7 +190,7 @@ public static class SettingsUpdater
     
     public static async Task TurnOnSideBySide(MainViewModel vm)
     {
-        SettingsHelper.Settings.ImageScaling.ShowImageSideBySide = true;
+        Settings.ImageScaling.ShowImageSideBySide = true;
         vm.IsShowingSideBySide = true;
         if (NavigationHelper.CanNavigate(vm))
         {
@@ -212,7 +211,7 @@ public static class SettingsUpdater
             return;
         }
         
-        if (SettingsHelper.Settings.Zoom.ScrollEnabled)
+        if (Settings.Zoom.ScrollEnabled)
         {
             TurnOffScroll(vm);
         }
@@ -223,7 +222,7 @@ public static class SettingsUpdater
 
         WindowResizing.SetSize(vm);
         
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
     }
     
     public static void TurnOffScroll(MainViewModel vm)
@@ -231,7 +230,7 @@ public static class SettingsUpdater
         vm.ToggleScrollBarVisibility = ScrollBarVisibility.Disabled;
         vm.GetIsScrollingTranslation = TranslationHelper.Translation.ScrollingDisabled;
         vm.IsScrollingEnabled = false;
-        SettingsHelper.Settings.Zoom.ScrollEnabled = false;
+        Settings.Zoom.ScrollEnabled = false;
     }
     
     public static void TurnOnScroll(MainViewModel vm)
@@ -239,7 +238,7 @@ public static class SettingsUpdater
         vm.ToggleScrollBarVisibility = ScrollBarVisibility.Visible;
         vm.GetIsScrollingTranslation = TranslationHelper.Translation.ScrollingEnabled;
         vm.IsScrollingEnabled = true;
-        SettingsHelper.Settings.Zoom.ScrollEnabled = true;
+        Settings.Zoom.ScrollEnabled = true;
     }
     
     public static async Task ToggleCtrlZoom(MainViewModel vm)
@@ -249,8 +248,8 @@ public static class SettingsUpdater
             return;
         }
         
-        SettingsHelper.Settings.Zoom.CtrlZoom = !SettingsHelper.Settings.Zoom.CtrlZoom;
-        vm.GetIsCtrlZoomTranslation = SettingsHelper.Settings.Zoom.CtrlZoom
+        Settings.Zoom.CtrlZoom = !Settings.Zoom.CtrlZoom;
+        vm.GetIsCtrlZoomTranslation = Settings.Zoom.CtrlZoom
             ? TranslationHelper.Translation.CtrlToZoom
             : TranslationHelper.Translation.ScrollToZoom;
         
@@ -263,14 +262,14 @@ public static class SettingsUpdater
         {
             return;
         }
-        var isNavigatingWithCtrl = SettingsHelper.Settings.Zoom.CtrlZoom;
+        var isNavigatingWithCtrl = Settings.Zoom.CtrlZoom;
         vm.ChangeCtrlZoomImage = isNavigatingWithCtrl ? leftRightArrowsImage as DrawingImage : scanEyeImage as DrawingImage;
-        await SettingsHelper.SaveSettingsAsync().ConfigureAwait(false);
+        await SaveSettingsAsync().ConfigureAwait(false);
     }
     
     public static void TurnOffCtrlZoom(MainViewModel vm)
     {
-        SettingsHelper.Settings.Zoom.CtrlZoom = false;
+        Settings.Zoom.CtrlZoom = false;
         vm.GetIsCtrlZoomTranslation = TranslationHelper.Translation.ScrollToZoom;
         if (!Application.Current.TryGetResource("ScanEyeImage", Application.Current.RequestedThemeVariant, out var scanEyeImage ))
         {
@@ -288,8 +287,8 @@ public static class SettingsUpdater
             return;
         }
         
-        var value = !SettingsHelper.Settings.UIProperties.Looping;
-        SettingsHelper.Settings.UIProperties.Looping = value;
+        var value = !Settings.UIProperties.Looping;
+        Settings.UIProperties.Looping = value;
         vm.GetIsLoopingTranslation = value
             ? TranslationHelper.Translation.LoopingEnabled
             : TranslationHelper.Translation.LoopingDisabled;
@@ -300,12 +299,12 @@ public static class SettingsUpdater
             : TranslationHelper.Translation.LoopingDisabled;
         await TooltipHelper.ShowTooltipMessageAsync(msg);
 
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
     }
     
     public static void TurnOffLooping(MainViewModel vm)
     {
-        SettingsHelper.Settings.UIProperties.Looping = false;
+        Settings.UIProperties.Looping = false;
         vm.GetIsLoopingTranslation = TranslationHelper.Translation.LoopingDisabled;
         vm.IsLooping = false;
     }

+ 7 - 8
src/PicView.Avalonia/StartUp/QuickLoad.cs

@@ -6,7 +6,6 @@ using PicView.Avalonia.Preloading;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.FileHandling;
 using PicView.Core.Gallery;
 
@@ -39,7 +38,7 @@ public static class QuickLoad
         vm.ImageSource = imageModel.Image;
         vm.ImageType = imageModel.ImageType;
         PreLoadValue? secondaryPreloadValue = null;
-        if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide)
+        if (Settings.ImageScaling.ShowImageSideBySide)
         {
             vm.ImageIterator = new ImageIterator(fileInfo, vm);
             secondaryPreloadValue = await vm.ImageIterator.GetNextPreLoadValueAsync();
@@ -49,7 +48,7 @@ public static class QuickLoad
         {
             vm.ImageViewer.SetTransform(imageModel.EXIFOrientation);
             WindowResizing.SetSize(imageModel.PixelWidth, imageModel.PixelHeight, secondaryPreloadValue?.ImageModel?.PixelWidth ?? 0, secondaryPreloadValue?.ImageModel?.PixelHeight ?? 0, imageModel.Rotation, vm);
-            if (SettingsHelper.Settings.WindowProperties.AutoFit)
+            if (Settings.WindowProperties.AutoFit)
             {
                 WindowFunctions.CenterWindowOnScreen();
             }
@@ -64,7 +63,7 @@ public static class QuickLoad
         vm.ImageIterator ??= new ImageIterator(fileInfo, vm);
         vm.GetIndex = vm.ImageIterator.CurrentIndex + 1;
 
-        if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide)
+        if (Settings.ImageScaling.ShowImageSideBySide)
         {
             SetTitleHelper.SetSideBySideTitle(vm, imageModel, secondaryPreloadValue?.ImageModel);
             
@@ -95,7 +94,7 @@ public static class QuickLoad
         
         if (vm.ImageIterator.ImagePaths.Count > 1)
         {
-            if (SettingsHelper.Settings.UIProperties.IsTaskbarProgressEnabled)
+            if (Settings.UIProperties.IsTaskbarProgressEnabled)
             {
                 await Dispatcher.UIThread.InvokeAsync(() =>
                 {
@@ -106,19 +105,19 @@ public static class QuickLoad
             tasks.Add(vm.ImageIterator.Preload());
         }
 
-        if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+        if (Settings.Gallery.IsBottomGalleryShown)
         {
             if (vm.IsUIShown)
             {
                 vm.GalleryMode = GalleryMode.BottomNoAnimation;
                 tasks.Add(GalleryLoad.LoadGallery(vm, fileInfo.DirectoryName));
             }
-            else if (SettingsHelper.Settings.Gallery.ShowBottomGalleryInHiddenUI)
+            else if (Settings.Gallery.ShowBottomGalleryInHiddenUI)
             {
                 vm.GalleryMode = GalleryMode.BottomNoAnimation;
                 tasks.Add(GalleryLoad.LoadGallery(vm, fileInfo.DirectoryName));
             }
-            else if (SettingsHelper.Settings.WindowProperties.Fullscreen)
+            else if (Settings.WindowProperties.Fullscreen)
             {
                 vm.GalleryMode = GalleryMode.BottomNoAnimation;
                 tasks.Add(GalleryLoad.LoadGallery(vm, fileInfo.DirectoryName));

+ 54 - 55
src/PicView.Avalonia/StartUp/StartUpHelper.cs

@@ -15,7 +15,6 @@ using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.Views;
 using PicView.Avalonia.WindowBehavior;
 using PicView.Core.Calculations;
-using PicView.Core.Config;
 using PicView.Core.Gallery;
 using PicView.Core.ProcessHandling;
 
@@ -34,7 +33,7 @@ public static class StartUpHelper
         }
         else
         {
-            if (SettingsHelper.Settings.UIProperties.OpenInSameWindow &&
+            if (Settings.UIProperties.OpenInSameWindow &&
                 ProcessHelper.CheckIfAnotherInstanceIsRunning())
             {
                 HandleMultipleInstances(args);
@@ -60,7 +59,7 @@ public static class StartUpHelper
         
         InitializeSettings(vm);
 
-        if (SettingsHelper.Settings.WindowProperties.Fullscreen)
+        if (Settings.WindowProperties.Fullscreen)
         {
             window.Show();
             WindowFunctions.Fullscreen(vm, desktop);
@@ -68,7 +67,7 @@ public static class StartUpHelper
 
         ScreenHelper.UpdateScreenSize(window);
         
-        if (SettingsHelper.Settings.WindowProperties.AutoFit && !SettingsHelper.Settings.WindowProperties.Fullscreen)
+        if (Settings.WindowProperties.AutoFit && !Settings.WindowProperties.Fullscreen)
         {
             window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
             window.Width = SizeDefaults.WindowMinSize;
@@ -94,15 +93,15 @@ public static class StartUpHelper
         
         if (settingsExists)
         {
-            if (SettingsHelper.Settings.WindowProperties.Maximized && !SettingsHelper.Settings.WindowProperties.Fullscreen)
+            if (Settings.WindowProperties.Maximized && !Settings.WindowProperties.Fullscreen)
             {
                 WindowFunctions.Maximize();
             }
-            else if (SettingsHelper.Settings.WindowProperties.AutoFit && !SettingsHelper.Settings.WindowProperties.Fullscreen)
+            else if (Settings.WindowProperties.AutoFit && !Settings.WindowProperties.Fullscreen)
             {
                 HandleAutoFit(vm);
             }
-            else if (!SettingsHelper.Settings.WindowProperties.Fullscreen)
+            else if (!Settings.WindowProperties.Fullscreen)
             {
                 HandleNormalWindow(vm, window);
             }
@@ -116,14 +115,14 @@ public static class StartUpHelper
 
         Application.Current.Name = "PicView";
 
-        if (SettingsHelper.Settings.UIProperties.OpenInSameWindow)
+        if (Settings.UIProperties.OpenInSameWindow)
         {
             // No other instance is running, create named pipe server
             _ = IPC.StartListeningForArguments(vm);
         }
         
         // Fixes incorrect fullscreen window
-        if (SettingsHelper.Settings.WindowProperties.Fullscreen)
+        if (Settings.WindowProperties.Fullscreen)
         {
             Dispatcher.UIThread.InvokeAsync(() =>
             {
@@ -136,18 +135,18 @@ public static class StartUpHelper
 
     private static void HandleThemeUpdates(MainViewModel vm)
     {
-        if (SettingsHelper.Settings.Theme.GlassTheme)
+        if (Settings.Theme.GlassTheme)
         {
             ThemeManager.GlassThemeUpdates();
         }
 
         BackgroundManager.SetBackground(vm);
-        ColorManager.UpdateAccentColors(SettingsHelper.Settings.Theme.ColorTheme);
+        ColorManager.UpdateAccentColors(Settings.Theme.ColorTheme);
     }
 
     private static void HandleWindowControlSettings(MainViewModel vm, IClassicDesktopStyleApplicationLifetime desktop)
     {
-        if (SettingsHelper.Settings.Zoom.ScrollEnabled)
+        if (Settings.Zoom.ScrollEnabled)
         {
             vm.ToggleScrollBarVisibility = ScrollBarVisibility.Visible;
             vm.IsScrollingEnabled = true;
@@ -158,7 +157,7 @@ public static class StartUpHelper
             vm.IsScrollingEnabled = false;
         }
 
-        if (SettingsHelper.Settings.WindowProperties.TopMost)
+        if (Settings.WindowProperties.TopMost)
         {
             desktop.MainWindow.Topmost = true;
         }
@@ -171,9 +170,9 @@ public static class StartUpHelper
             vm.CurrentView = vm.ImageViewer;
             Task.Run(() => QuickLoad.QuickLoadAsync(vm, args[1]));
         }
-        else if (SettingsHelper.Settings.StartUp.OpenLastFile)
+        else if (Settings.StartUp.OpenLastFile)
         {
-            if (string.IsNullOrWhiteSpace(SettingsHelper.Settings.StartUp.LastFile))
+            if (string.IsNullOrWhiteSpace(Settings.StartUp.LastFile))
             {
                 vm.CurrentView = new StartUpMenu();
                 vm.IsLoading = false;
@@ -181,7 +180,7 @@ public static class StartUpHelper
             else
             {
                 vm.CurrentView = vm.ImageViewer;
-                Task.Run(() => QuickLoad.QuickLoadAsync(vm, SettingsHelper.Settings.StartUp.LastFile));
+                Task.Run(() => QuickLoad.QuickLoadAsync(vm, Settings.StartUp.LastFile));
             }
         }
         else
@@ -196,10 +195,10 @@ public static class StartUpHelper
         vm.CanResize = true;
         vm.IsAutoFit = false;
         WindowFunctions.InitializeWindowSizeAndPosition(window);
-        if (SettingsHelper.Settings.UIProperties.ShowInterface)
+        if (Settings.UIProperties.ShowInterface)
         {
             vm.IsTopToolbarShown = true;
-            vm.IsBottomToolbarShown = SettingsHelper.Settings.UIProperties.ShowBottomNavBar;
+            vm.IsBottomToolbarShown = Settings.UIProperties.ShowBottomNavBar;
         }
     }
 
@@ -208,10 +207,10 @@ public static class StartUpHelper
         vm.SizeToContent = SizeToContent.WidthAndHeight;
         vm.CanResize = false;
         vm.IsAutoFit = true;
-        if (SettingsHelper.Settings.UIProperties.ShowInterface)
+        if (Settings.UIProperties.ShowInterface)
         {
             vm.IsTopToolbarShown = true;
-            vm.IsBottomToolbarShown = SettingsHelper.Settings.UIProperties.ShowBottomNavBar;
+            vm.IsBottomToolbarShown = Settings.UIProperties.ShowBottomNavBar;
         }
     }
 
@@ -221,7 +220,7 @@ public static class StartUpHelper
 
         if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
         {
-            SettingsHelper.Settings.Zoom.IsUsingTouchPad = true;
+            Settings.Zoom.IsUsingTouchPad = true;
         }
     }
 
@@ -248,8 +247,8 @@ public static class StartUpHelper
 
     private static void ValidateGallerySettings(MainViewModel vm, bool settingsExists)
     {
-        vm.GetFullGalleryItemHeight = SettingsHelper.Settings.Gallery.ExpandedGalleryItemSize;
-        vm.GetBottomGalleryItemHeight = SettingsHelper.Settings.Gallery.BottomGalleryItemSize;
+        vm.GetFullGalleryItemHeight = Settings.Gallery.ExpandedGalleryItemSize;
+        vm.GetBottomGalleryItemHeight = Settings.Gallery.BottomGalleryItemSize;
         if (!settingsExists)
         {
             vm.GetBottomGalleryItemHeight = GalleryDefaults.DefaultBottomGalleryHeight;
@@ -274,52 +273,52 @@ public static class StartUpHelper
             return;
         }
 
-        if (string.IsNullOrWhiteSpace(SettingsHelper.Settings.Gallery.BottomGalleryStretchMode))
+        if (string.IsNullOrWhiteSpace(Settings.Gallery.BottomGalleryStretchMode))
         {
-            SettingsHelper.Settings.Gallery.BottomGalleryStretchMode = "UniformToFill";
+            Settings.Gallery.BottomGalleryStretchMode = "UniformToFill";
         }
 
-        if (string.IsNullOrWhiteSpace(SettingsHelper.Settings.Gallery.FullGalleryStretchMode))
+        if (string.IsNullOrWhiteSpace(Settings.Gallery.FullGalleryStretchMode))
         {
-            SettingsHelper.Settings.Gallery.FullGalleryStretchMode = "UniformToFill";
+            Settings.Gallery.FullGalleryStretchMode = "UniformToFill";
         }
     }
     
     private static void InitializeSettings(MainViewModel vm)
     {
         vm.IsLoading = true;
-        vm.TitlebarHeight = SettingsHelper.Settings.WindowProperties.Fullscreen
-            || !SettingsHelper.Settings.UIProperties.ShowInterface
+        vm.TitlebarHeight = Settings.WindowProperties.Fullscreen
+            || !Settings.UIProperties.ShowInterface
             ? 0
             : SizeDefaults.TitlebarHeight;
-        vm.BottombarHeight = SettingsHelper.Settings.WindowProperties.Fullscreen
-                             || !SettingsHelper.Settings.UIProperties.ShowInterface
+        vm.BottombarHeight = Settings.WindowProperties.Fullscreen
+                             || !Settings.UIProperties.ShowInterface
             ? 0
             : SizeDefaults.BottombarHeight;
-        vm.GetNavSpeed = SettingsHelper.Settings.UIProperties.NavSpeed;
-        vm.GetSlideshowSpeed = SettingsHelper.Settings.UIProperties.SlideShowTimer;
-        vm.GetZoomSpeed = SettingsHelper.Settings.Zoom.ZoomSpeed;
-        vm.IsShowingSideBySide = SettingsHelper.Settings.ImageScaling.ShowImageSideBySide;
-        vm.IsGalleryShown = SettingsHelper.Settings.Gallery.ShowBottomGalleryInHiddenUI;
-        vm.IsAvoidingZoomingOut  = SettingsHelper.Settings.Zoom.AvoidZoomingOut;
-        vm.IsUIShown  = SettingsHelper.Settings.UIProperties.ShowInterface;
-        vm.IsTopToolbarShown  = SettingsHelper.Settings.UIProperties.ShowInterface;
-        vm.IsBottomToolbarShown   = SettingsHelper.Settings.UIProperties.ShowBottomNavBar &&
-                                    SettingsHelper.Settings.UIProperties.ShowInterface;
-        vm.IsBottomToolbarShownSetting = SettingsHelper.Settings.UIProperties.ShowBottomNavBar;
-        vm.IsShowingTaskbarProgress  = SettingsHelper.Settings.UIProperties.IsTaskbarProgressEnabled;
-        vm.IsFullscreen  = SettingsHelper.Settings.WindowProperties.Fullscreen;
-        vm.IsTopMost  = SettingsHelper.Settings.WindowProperties.TopMost;
-        vm.IsIncludingSubdirectories = SettingsHelper.Settings.Sorting.IncludeSubDirectories;
-        vm.IsStretched = SettingsHelper.Settings.ImageScaling.StretchImage;
-        vm.IsLooping  = SettingsHelper.Settings.UIProperties.Looping;
-        vm.IsAutoFit  = SettingsHelper.Settings.WindowProperties.AutoFit;
-        vm.IsStayingCentered  = SettingsHelper.Settings.WindowProperties.KeepCentered;
-        vm.IsOpeningInSameWindow  = SettingsHelper.Settings.UIProperties.OpenInSameWindow;
-        vm.IsShowingConfirmationOnEsc  = SettingsHelper.Settings.UIProperties.ShowConfirmationOnEsc;
-        vm.IsUsingTouchpad  = SettingsHelper.Settings.Zoom.IsUsingTouchPad;
-        vm.IsAscending  = SettingsHelper.Settings.Sorting.Ascending;
-        vm.BackgroundChoice = SettingsHelper.Settings.UIProperties.BgColorChoice;
+        vm.GetNavSpeed = Settings.UIProperties.NavSpeed;
+        vm.GetSlideshowSpeed = Settings.UIProperties.SlideShowTimer;
+        vm.GetZoomSpeed = Settings.Zoom.ZoomSpeed;
+        vm.IsShowingSideBySide = Settings.ImageScaling.ShowImageSideBySide;
+        vm.IsGalleryShown = Settings.Gallery.ShowBottomGalleryInHiddenUI;
+        vm.IsAvoidingZoomingOut  = Settings.Zoom.AvoidZoomingOut;
+        vm.IsUIShown  = Settings.UIProperties.ShowInterface;
+        vm.IsTopToolbarShown  = Settings.UIProperties.ShowInterface;
+        vm.IsBottomToolbarShown   = Settings.UIProperties.ShowBottomNavBar &&
+                                    Settings.UIProperties.ShowInterface;
+        vm.IsBottomToolbarShownSetting = Settings.UIProperties.ShowBottomNavBar;
+        vm.IsShowingTaskbarProgress  = Settings.UIProperties.IsTaskbarProgressEnabled;
+        vm.IsFullscreen  = Settings.WindowProperties.Fullscreen;
+        vm.IsTopMost  = Settings.WindowProperties.TopMost;
+        vm.IsIncludingSubdirectories = Settings.Sorting.IncludeSubDirectories;
+        vm.IsStretched = Settings.ImageScaling.StretchImage;
+        vm.IsLooping  = Settings.UIProperties.Looping;
+        vm.IsAutoFit  = Settings.WindowProperties.AutoFit;
+        vm.IsStayingCentered  = Settings.WindowProperties.KeepCentered;
+        vm.IsOpeningInSameWindow  = Settings.UIProperties.OpenInSameWindow;
+        vm.IsShowingConfirmationOnEsc  = Settings.UIProperties.ShowConfirmationOnEsc;
+        vm.IsUsingTouchpad  = Settings.Zoom.IsUsingTouchPad;
+        vm.IsAscending  = Settings.Sorting.Ascending;
+        vm.BackgroundChoice = Settings.UIProperties.BgColorChoice;
     }
 
     private static void SetWindowEventHandlers(Window w)

+ 1 - 2
src/PicView.Avalonia/UI/FunctionsHelper.cs

@@ -13,7 +13,6 @@ using PicView.Avalonia.Navigation;
 using PicView.Avalonia.SettingsManagement;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.FileHandling;
 using PicView.Core.ImageDecoding;
 using PicView.Core.ProcessHandling;
@@ -707,7 +706,7 @@ public static class FunctionsHelper
         }
         
         BackgroundManager.ChangeBackground(Vm);
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
     }
     
     public static async Task SideBySide()

+ 24 - 25
src/PicView.Avalonia/UI/HideInterfaceLogic.cs

@@ -6,7 +6,6 @@ using PicView.Avalonia.Navigation;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
 using PicView.Core.Calculations;
-using PicView.Core.Config;
 using PicView.Core.Gallery;
 using PicView.Core.Localization;
 
@@ -21,16 +20,16 @@ public static class HideInterfaceLogic
     /// <param name="vm">The view model. </param>
     public static async Task ToggleUI(MainViewModel vm)
     {
-        if (SettingsHelper.Settings.UIProperties.ShowInterface)
+        if (Settings.UIProperties.ShowInterface)
         {
             vm.IsUIShown = false;
-            SettingsHelper.Settings.UIProperties.ShowInterface = false;
+            Settings.UIProperties.ShowInterface = false;
             vm.IsTopToolbarShown = false;
             vm.IsBottomToolbarShown = false;
             vm.GetIsShowingUITranslation = TranslationHelper.Translation.ShowUI;
             if (!GalleryFunctions.IsFullGalleryOpen)
             {
-                if (!SettingsHelper.Settings.Gallery.ShowBottomGalleryInHiddenUI)
+                if (!Settings.Gallery.ShowBottomGalleryInHiddenUI)
                 {
                     vm.GalleryMode = GalleryMode.Closed;
                     await Dispatcher.UIThread.InvokeAsync(() =>
@@ -44,7 +43,7 @@ public static class HideInterfaceLogic
                 }
                 else
                 {
-                    vm.IsGalleryShown = SettingsHelper.Settings.Gallery.ShowBottomGalleryInHiddenUI;
+                    vm.IsGalleryShown = Settings.Gallery.ShowBottomGalleryInHiddenUI;
                 }
             }
         }
@@ -53,16 +52,16 @@ public static class HideInterfaceLogic
             vm.IsUIShown = true;
             vm.IsTopToolbarShown = true;
             vm.GetIsShowingUITranslation = TranslationHelper.Translation.HideUI;
-            if (SettingsHelper.Settings.UIProperties.ShowBottomNavBar)
+            if (Settings.UIProperties.ShowBottomNavBar)
             {
                 vm.IsBottomToolbarShown = true;
                 vm.BottombarHeight = SizeDefaults.BottombarHeight;
             }
-            SettingsHelper.Settings.UIProperties.ShowInterface = true;
+            Settings.UIProperties.ShowInterface = true;
             vm.TitlebarHeight = SizeDefaults.TitlebarHeight;
             if (!GalleryFunctions.IsFullGalleryOpen)
             {
-                if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+                if (Settings.Gallery.IsBottomGalleryShown)
                 {
                     if (NavigationHelper.CanNavigate(vm))
                     {
@@ -88,7 +87,7 @@ public static class HideInterfaceLogic
         
         WindowResizing.SetSize(vm);
         UIHelper.CloseMenus(vm);
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
     }
     
     /// <summary>
@@ -97,17 +96,17 @@ public static class HideInterfaceLogic
     /// <param name="vm">The view model. </param>
     public static async Task ToggleBottomToolbar(MainViewModel vm)
     {
-        if (SettingsHelper.Settings.UIProperties.ShowBottomNavBar)
+        if (Settings.UIProperties.ShowBottomNavBar)
         {
             vm.IsBottomToolbarShown = false;
-            SettingsHelper.Settings.UIProperties.ShowBottomNavBar = false;
+            Settings.UIProperties.ShowBottomNavBar = false;
             vm.IsBottomToolbarShownSetting = false;
             vm.GetIsShowingBottomToolbarTranslation = TranslationHelper.Translation.ShowBottomToolbar;
         }
         else
         {
             vm.IsBottomToolbarShown = true;
-            SettingsHelper.Settings.UIProperties.ShowBottomNavBar = true;
+            Settings.UIProperties.ShowBottomNavBar = true;
             vm.IsBottomToolbarShownSetting = true;
             vm.BottombarHeight = SizeDefaults.BottombarHeight;
             vm.GetIsShowingBottomToolbarTranslation = TranslationHelper.Translation.HideBottomToolbar;
@@ -117,7 +116,7 @@ public static class HideInterfaceLogic
             WindowResizing.SetSize(vm);
         });
         
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
     }
     
     #endregion
@@ -140,7 +139,7 @@ public static class HideInterfaceLogic
     {
         childControl.PointerEntered += delegate
         {
-            if (!SettingsHelper.Settings.UIProperties.ShowAltInterfaceButtons)
+            if (!Settings.UIProperties.ShowAltInterfaceButtons)
             {
                 return;
             }
@@ -167,7 +166,7 @@ public static class HideInterfaceLogic
         };
         parent.PointerEntered += async delegate
         {
-            if (!SettingsHelper.Settings.UIProperties.ShowAltInterfaceButtons)
+            if (!Settings.UIProperties.ShowAltInterfaceButtons)
             {
                 return;
             }
@@ -207,7 +206,7 @@ public static class HideInterfaceLogic
     
     private static async Task DoHoverButtonAnimation(bool isShown, Control parent, MainViewModel vm)
     {
-        if (_isHoverButtonAnimationRunning || !SettingsHelper.Settings.UIProperties.ShowAltInterfaceButtons)
+        if (_isHoverButtonAnimationRunning || !Settings.UIProperties.ShowAltInterfaceButtons)
         {
             return;
         }
@@ -233,7 +232,7 @@ public static class HideInterfaceLogic
     }
     private static async Task DoHoverButtonAnimation(bool isShown, Control parent, Control childControl, MainViewModel vm)
     {
-        if (_isHoverButtonAnimationRunning || !SettingsHelper.Settings.UIProperties.ShowAltInterfaceButtons)
+        if (_isHoverButtonAnimationRunning || !Settings.UIProperties.ShowAltInterfaceButtons)
         {
             return;
         }
@@ -264,35 +263,35 @@ public static class HideInterfaceLogic
 
     public static async Task ToggleBottomGalleryShownInHiddenUI(MainViewModel vm)
     {
-        SettingsHelper.Settings.Gallery.ShowBottomGalleryInHiddenUI = !SettingsHelper.Settings.Gallery
+        Settings.Gallery.ShowBottomGalleryInHiddenUI = !Settings.Gallery
             .ShowBottomGalleryInHiddenUI;
-        vm.IsBottomGalleryShownInHiddenUI = SettingsHelper.Settings.Gallery.ShowBottomGalleryInHiddenUI;
+        vm.IsBottomGalleryShownInHiddenUI = Settings.Gallery.ShowBottomGalleryInHiddenUI;
 
         if (!GalleryFunctions.IsFullGalleryOpen)
         {
-            if (!SettingsHelper.Settings.UIProperties.ShowInterface && !SettingsHelper.Settings.Gallery
+            if (!Settings.UIProperties.ShowInterface && !Settings.Gallery
                     .ShowBottomGalleryInHiddenUI)
             {
                 vm.IsGalleryShown = false;
             }
             else
             {
-                vm.IsGalleryShown = SettingsHelper.Settings.Gallery.IsBottomGalleryShown;
+                vm.IsGalleryShown = Settings.Gallery.IsBottomGalleryShown;
             }
         }
         
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
     }
 
     public static async Task ToggleFadeInButtonsOnHover(MainViewModel vm)
     {
-        SettingsHelper.Settings.UIProperties.ShowAltInterfaceButtons = !SettingsHelper.Settings
+        Settings.UIProperties.ShowAltInterfaceButtons = !Settings
             .UIProperties.ShowAltInterfaceButtons;
         
-        vm.GetIsShowingFadingUIButtonsTranslation = SettingsHelper.Settings.UIProperties.ShowAltInterfaceButtons
+        vm.GetIsShowingFadingUIButtonsTranslation = Settings.UIProperties.ShowAltInterfaceButtons
             ? TranslationHelper.Translation.DisableFadeInButtonsOnHover
             : TranslationHelper.Translation.ShowFadeInButtonsOnHover;
         
-        await SettingsHelper.SaveSettingsAsync();
+        await SaveSettingsAsync();
     }
 }

+ 2 - 3
src/PicView.Avalonia/UI/UIHelper.cs

@@ -12,7 +12,6 @@ using PicView.Avalonia.Views.UC;
 using PicView.Avalonia.Views.UC.Menus;
 using PicView.Avalonia.Views.UC.PopUps;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.Gallery;
 
 namespace PicView.Avalonia.UI;
@@ -242,7 +241,7 @@ public static class UIHelper
             return;
         }
 
-        if (SettingsHelper.Settings.WindowProperties.Fullscreen)
+        if (Settings.WindowProperties.Fullscreen)
         {
             await WindowFunctions.MaximizeRestore();
             return;
@@ -254,7 +253,7 @@ public static class UIHelper
 
         await Dispatcher.UIThread.InvokeAsync(() =>
         {
-            if (SettingsHelper.Settings.UIProperties.ShowConfirmationOnEsc)
+            if (Settings.UIProperties.ShowConfirmationOnEsc)
             {
                 GetMainView.MainGrid.Children.Add(new CloseDialog());
             }

+ 11 - 12
src/PicView.Avalonia/Views/AppearanceView.axaml.cs

@@ -5,7 +5,6 @@ using PicView.Avalonia.ColorManagement;
 using PicView.Avalonia.Gallery;
 using PicView.Avalonia.ViewModels;
 using PicView.Core.ColorHandling;
-using PicView.Core.Config;
 using ReactiveUI;
 
 namespace PicView.Avalonia.Views;
@@ -27,35 +26,35 @@ public partial class AppearanceView : UserControl
         }
         GalleryStretchMode.DetermineStretchMode(vm);
 
-        if (SettingsHelper.Settings.Theme.GlassTheme)
+        if (Settings.Theme.GlassTheme)
         {
             ThemeBox.SelectedItem = GlassThemeBox;
         }
         else
         {
-            ThemeBox.SelectedItem = SettingsHelper.Settings.Theme.Dark ? DarkThemeBox : LightThemeBox;
+            ThemeBox.SelectedItem = Settings.Theme.Dark ? DarkThemeBox : LightThemeBox;
         }
         ThemeBox.SelectionChanged += delegate
         {
             // Adjust based on which theme is selected
             if (Equals(ThemeBox.SelectedItem, GlassThemeBox))
             {
-                SettingsHelper.Settings.Theme.GlassTheme = true;
+                Settings.Theme.GlassTheme = true;
             }
             else if (Equals(ThemeBox.SelectedItem, DarkThemeBox))
             {
-                SettingsHelper.Settings.Theme.GlassTheme = false;
-                SettingsHelper.Settings.Theme.Dark = true;
+                Settings.Theme.GlassTheme = false;
+                Settings.Theme.Dark = true;
             }
             else
             {
-                SettingsHelper.Settings.Theme.GlassTheme = false;
-                SettingsHelper.Settings.Theme.Dark = false;
+                Settings.Theme.GlassTheme = false;
+                Settings.Theme.Dark = false;
             }
 
-            var selectedTheme = SettingsHelper.Settings.Theme.GlassTheme
+            var selectedTheme = Settings.Theme.GlassTheme
                 ? ThemeManager.Theme.Glass
-                : SettingsHelper.Settings.Theme.Dark
+                : Settings.Theme.Dark
                     ? ThemeManager.Theme.Dark
                     : ThemeManager.Theme.Light;
 
@@ -63,7 +62,7 @@ public partial class AppearanceView : UserControl
         };
 
         ClearColorButtonsActiveState();
-        switch ((ColorOptions)SettingsHelper.Settings.Theme.ColorTheme)
+        switch ((ColorOptions)Settings.Theme.ColorTheme)
         {
             case ColorOptions.Aqua:
                 AquaButton.Classes.Add("active");
@@ -108,7 +107,7 @@ public partial class AppearanceView : UserControl
         
         // Subscribe to background color changes with ReactiveUI
         vm.WhenAnyValue(x => x.BackgroundChoice)
-            .Subscribe(_ => SetBackgroundTheme(SettingsHelper.Settings.UIProperties.BgColorChoice))
+            .Subscribe(_ => SetBackgroundTheme(Settings.UIProperties.BgColorChoice))
             .DisposeWith(_disposables);
     }
 

+ 3 - 4
src/PicView.Avalonia/Views/BottomBar.axaml.cs

@@ -5,7 +5,6 @@ using Avalonia.Input;
 using Avalonia.Media;
 using PicView.Avalonia.DragAndDrop;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views;
 
@@ -29,7 +28,7 @@ public partial class BottomBar : UserControl
                 DragAndDropHelper.RemoveDragDropView();
             };
 
-            if (SettingsHelper.Settings.Theme.GlassTheme)
+            if (Settings.Theme.GlassTheme)
             {
                 MainBottomBorder.Background = Brushes.Transparent;
                 MainBottomBorder.BorderThickness = new Thickness(0);
@@ -76,10 +75,10 @@ public partial class BottomBar : UserControl
             
             // TODO add interval to mainviewmodel
             NextButton.Interval =
-                (int)TimeSpan.FromSeconds(SettingsHelper.Settings.UIProperties.NavSpeed).TotalMilliseconds;
+                (int)TimeSpan.FromSeconds(Settings.UIProperties.NavSpeed).TotalMilliseconds;
 
             PreviousButton.Interval =
-                (int)TimeSpan.FromSeconds(SettingsHelper.Settings.UIProperties.NavSpeed).TotalMilliseconds;
+                (int)TimeSpan.FromSeconds(Settings.UIProperties.NavSpeed).TotalMilliseconds;
 
         };
     }

+ 6 - 7
src/PicView.Avalonia/Views/GallerySettingsView.axaml.cs

@@ -2,7 +2,6 @@
 using Avalonia.Media;
 using PicView.Avalonia.Gallery;
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views;
 
@@ -45,17 +44,17 @@ public partial class GalleryView : UserControl
             }
             else
             {
-                if (SettingsHelper.Settings.Gallery.FullGalleryStretchMode.Equals("Square",
+                if (Settings.Gallery.FullGalleryStretchMode.Equals("Square",
                         StringComparison.OrdinalIgnoreCase))
                 {
                     FullGalleryComboBox.SelectedIndex = 4;
                 }
-                else if (SettingsHelper.Settings.Gallery.FullGalleryStretchMode.Equals("FillSquare",
+                else if (Settings.Gallery.FullGalleryStretchMode.Equals("FillSquare",
                              StringComparison.OrdinalIgnoreCase))
                 {
                     FullGalleryComboBox.SelectedIndex = 5;
                 }
-                else if (Enum.TryParse<Stretch>(SettingsHelper.Settings.Gallery.FullGalleryStretchMode,
+                else if (Enum.TryParse<Stretch>(Settings.Gallery.FullGalleryStretchMode,
                              out var stretchMode))
                 {
                     FullGalleryComboBox.SelectedIndex = stretchMode switch
@@ -95,17 +94,17 @@ public partial class GalleryView : UserControl
             }
             else
             {
-                if (SettingsHelper.Settings.Gallery.BottomGalleryStretchMode.Equals("Square",
+                if (Settings.Gallery.BottomGalleryStretchMode.Equals("Square",
                         StringComparison.OrdinalIgnoreCase))
                 {
                     BottomGalleryComboBox.SelectedIndex = 4;
                 }
-                else if (SettingsHelper.Settings.Gallery.BottomGalleryStretchMode.Equals("FillSquare",
+                else if (Settings.Gallery.BottomGalleryStretchMode.Equals("FillSquare",
                              StringComparison.OrdinalIgnoreCase))
                 {
                     BottomGalleryComboBox.SelectedIndex = 5;
                 }
-                else if (Enum.TryParse<Stretch>(SettingsHelper.Settings.Gallery.BottomGalleryStretchMode,
+                else if (Enum.TryParse<Stretch>(Settings.Gallery.BottomGalleryStretchMode,
                              out var stretchMode))
                 {
                     BottomGalleryComboBox.SelectedIndex = stretchMode switch

+ 4 - 5
src/PicView.Avalonia/Views/GeneralSettingsView.axaml.cs

@@ -1,5 +1,4 @@
 using Avalonia.Controls;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views;
 
@@ -10,7 +9,7 @@ public partial class GeneralSettingsView : UserControl
         InitializeComponent();
         Loaded += delegate
         {
-            ApplicationStartupBox.SelectedIndex = SettingsHelper.Settings.StartUp.OpenLastFile ? 1 : 0;
+            ApplicationStartupBox.SelectedIndex = Settings.StartUp.OpenLastFile ? 1 : 0;
             
             ApplicationStartupBox.SelectionChanged += async delegate
             {
@@ -18,14 +17,14 @@ public partial class GeneralSettingsView : UserControl
                 {
                     return;
                 }
-                SettingsHelper.Settings.StartUp.OpenLastFile = ApplicationStartupBox.SelectedIndex == 1;
-                await SettingsHelper.SaveSettingsAsync();
+                Settings.StartUp.OpenLastFile = ApplicationStartupBox.SelectedIndex == 1;
+                await SaveSettingsAsync();
             };
             ApplicationStartupBox.DropDownOpened += delegate
             {
                 if (ApplicationStartupBox.SelectedIndex == -1)
                 {
-                    ApplicationStartupBox.SelectedIndex = SettingsHelper.Settings.StartUp.OpenLastFile ? 0 : 1;
+                    ApplicationStartupBox.SelectedIndex = Settings.StartUp.OpenLastFile ? 0 : 1;
                 }
             };
         };

+ 4 - 5
src/PicView.Avalonia/Views/ImageSettingsView.axaml.cs

@@ -1,6 +1,5 @@
 using Avalonia.Controls;
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views;
     public partial class ImageSettingsView : UserControl
@@ -10,7 +9,7 @@ namespace PicView.Avalonia.Views;
             InitializeComponent();
             Loaded += delegate
             {
-                ImageAliasingBox.SelectedIndex = SettingsHelper.Settings.ImageScaling.IsScalingSetToNearestNeighbor ? 1 : 0;
+                ImageAliasingBox.SelectedIndex = Settings.ImageScaling.IsScalingSetToNearestNeighbor ? 1 : 0;
             
                 ImageAliasingBox.SelectionChanged += async delegate
                 {
@@ -18,18 +17,18 @@ namespace PicView.Avalonia.Views;
                     {
                         return;
                     }
-                    SettingsHelper.Settings.ImageScaling.IsScalingSetToNearestNeighbor = ImageAliasingBox.SelectedIndex == 1;
+                    Settings.ImageScaling.IsScalingSetToNearestNeighbor = ImageAliasingBox.SelectedIndex == 1;
                     if (DataContext is MainViewModel vm)
                     {
                         vm.ImageViewer.TriggerScalingModeUpdate(true);
                     }
-                    await SettingsHelper.SaveSettingsAsync();
+                    await SaveSettingsAsync();
                 };
                 ImageAliasingBox.DropDownOpened += delegate
                 {
                     if (ImageAliasingBox.SelectedIndex == -1)
                     {
-                        ImageAliasingBox.SelectedIndex = SettingsHelper.Settings.ImageScaling.IsScalingSetToNearestNeighbor ? 0 : 1;
+                        ImageAliasingBox.SelectedIndex = Settings.ImageScaling.IsScalingSetToNearestNeighbor ? 0 : 1;
                     }
                 };
             };

+ 12 - 13
src/PicView.Avalonia/Views/ImageViewer.axaml.cs

@@ -11,7 +11,6 @@ using PicView.Avalonia.Navigation;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.ImageDecoding;
 using PicView.Core.ImageTransformations;
 using Point = Avalonia.Point;
@@ -49,7 +48,7 @@ public partial class ImageViewer : UserControl
     
     public void TriggerScalingModeUpdate(bool invalidate)
     {
-        var scalingMode = SettingsHelper.Settings.ImageScaling.IsScalingSetToNearestNeighbor 
+        var scalingMode = Settings.ImageScaling.IsScalingSetToNearestNeighbor 
             ? BitmapInterpolationMode.LowQuality 
             : BitmapInterpolationMode.HighQuality;
 
@@ -76,7 +75,7 @@ public partial class ImageViewer : UserControl
         if (DataContext is not MainViewModel mainViewModel)
             return;
 
-        if (SettingsHelper.Settings.Zoom.IsUsingTouchPad)
+        if (Settings.Zoom.IsUsingTouchPad)
         {
             // Use touch gestures for zooming
             return;
@@ -85,11 +84,11 @@ public partial class ImageViewer : UserControl
         var shift = e.KeyModifiers == KeyModifiers.Shift;
         var reverse = e.Delta.Y < 0;
         
-        if (SettingsHelper.Settings.Zoom.ScrollEnabled)
+        if (Settings.Zoom.ScrollEnabled)
         {
             if (!shift)
             {
-                if (ctrl && !SettingsHelper.Settings.Zoom.CtrlZoom)
+                if (ctrl && !Settings.Zoom.CtrlZoom)
                 {
                     await LoadNextPic();
                     return;
@@ -114,7 +113,7 @@ public partial class ImageViewer : UserControl
             
         }
 
-        if (SettingsHelper.Settings.Zoom.CtrlZoom)
+        if (Settings.Zoom.CtrlZoom)
         {
             if (ctrl)
             {
@@ -154,7 +153,7 @@ public partial class ImageViewer : UserControl
 
         async Task ScrollOrNavigate()
         {
-            if (!SettingsHelper.Settings.Zoom.ScrollEnabled || e.KeyModifiers == KeyModifiers.Shift)
+            if (!Settings.Zoom.ScrollEnabled || e.KeyModifiers == KeyModifiers.Shift)
             {
                 await LoadNextPic();
             }
@@ -188,11 +187,11 @@ public partial class ImageViewer : UserControl
             bool next;
             if (reverse)
             {
-                next = SettingsHelper.Settings.Zoom.HorizontalReverseScroll;
+                next = Settings.Zoom.HorizontalReverseScroll;
             }
             else
             {
-                next = !SettingsHelper.Settings.Zoom.HorizontalReverseScroll;
+                next = !Settings.Zoom.HorizontalReverseScroll;
             }
 
             await NavigationHelper.Navigate(next, mainViewModel).ConfigureAwait(false);
@@ -247,7 +246,7 @@ public partial class ImageViewer : UserControl
             return;
         }
         var currentZoom = _scaleTransform.ScaleX;
-        var zoomSpeed = SettingsHelper.Settings.Zoom.ZoomSpeed;
+        var zoomSpeed = Settings.Zoom.ZoomSpeed;
         
         switch (currentZoom)
         {
@@ -276,7 +275,7 @@ public partial class ImageViewer : UserControl
         currentZoom += zoomSpeed;
         currentZoom = Math.Max(0.09, currentZoom); // Fix for zooming out too much
         TriggerScalingModeUpdate(false);
-        if (SettingsHelper.Settings.Zoom.AvoidZoomingOut && currentZoom < 1.0)
+        if (Settings.Zoom.AvoidZoomingOut && currentZoom < 1.0)
         {
             ResetZoom(true);
         }
@@ -437,7 +436,7 @@ public partial class ImageViewer : UserControl
         var newXproperty = _origin.X - dragMousePosition.X;
         var newYproperty = _origin.Y - dragMousePosition.Y;
 
-        if (!SettingsHelper.Settings.WindowProperties.AutoFit || SettingsHelper.Settings.WindowProperties.Fullscreen)
+        if (!Settings.WindowProperties.AutoFit || Settings.WindowProperties.Fullscreen)
         {
             // TODO: figure out how to pan when not auto fitting window while keeping it in bounds
             _translateTransform.Transitions = null;
@@ -615,7 +614,7 @@ public partial class ImageViewer : UserControl
 
         void Set()
         {
-            if (SettingsHelper.Settings.Zoom.ScrollEnabled)
+            if (Settings.Zoom.ScrollEnabled)
             {
                 ImageScrollViewer.ScrollToHome();
             }

+ 9 - 10
src/PicView.Avalonia/Views/LanguageView.axaml.cs

@@ -2,7 +2,6 @@
 using Avalonia.Controls;
 using PicView.Avalonia.SettingsManagement;
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 using PicView.Core.Localization;
 
 namespace PicView.Avalonia.Views;
@@ -26,9 +25,9 @@ public partial class LanguageView : UserControl
                 var lang = Path.GetFileNameWithoutExtension(language);
                 var isSelected = lang.Length switch
                 {
-                    >= 4 => lang[^2..] == SettingsHelper.Settings.UIProperties.UserLanguage[^2..],
-                    2 => lang[..2] == SettingsHelper.Settings.UIProperties.UserLanguage[..2],
-                    _ => lang == SettingsHelper.Settings.UIProperties.UserLanguage
+                    >= 4 => lang[^2..] == Settings.UIProperties.UserLanguage[^2..],
+                    2 => lang[..2] == Settings.UIProperties.UserLanguage[..2],
+                    _ => lang == Settings.UIProperties.UserLanguage
                 };
 
                 var comboBoxItem = new ComboBoxItem
@@ -61,7 +60,7 @@ public partial class LanguageView : UserControl
                     }
 
                     // Check if the selected language exactly matches, including culture
-                    if (tag.Equals(SettingsHelper.Settings.UIProperties.UserLanguage,
+                    if (tag.Equals(Settings.UIProperties.UserLanguage,
                             StringComparison.OrdinalIgnoreCase))
                     {
                         LanguageBox.SelectedIndex = i;
@@ -69,14 +68,14 @@ public partial class LanguageView : UserControl
                     }
 
                     // If the language tag starts with the two-letter ISO code and contains a culture (e.g., "zh" and "zh-CN")
-                    if (tag.StartsWith(SettingsHelper.Settings.UIProperties.UserLanguage[..2],
+                    if (tag.StartsWith(Settings.UIProperties.UserLanguage[..2],
                             StringComparison.OrdinalIgnoreCase))
                     {
                         // Check if the user's selected language contains a culture (like "zh-CN")
-                        if (SettingsHelper.Settings.UIProperties.UserLanguage.Length > 2)
+                        if (Settings.UIProperties.UserLanguage.Length > 2)
                         {
                             // Select the specific culture version if the tag matches up to the dash (e.g., "zh-CN")
-                            if (tag.StartsWith(SettingsHelper.Settings.UIProperties.UserLanguage,
+                            if (tag.StartsWith(Settings.UIProperties.UserLanguage,
                                     StringComparison.OrdinalIgnoreCase))
                             {
                                 LanguageBox.SelectedIndex = i;
@@ -106,12 +105,12 @@ public partial class LanguageView : UserControl
                     return;
                 }
 
-                if (language == SettingsHelper.Settings.UIProperties.UserLanguage)
+                if (language == Settings.UIProperties.UserLanguage)
                 {
                     return;
                 }
 
-                SettingsHelper.Settings.UIProperties.UserLanguage = language;
+                Settings.UIProperties.UserLanguage = language;
 
                 await TranslationHelper.LoadLanguage(language).ConfigureAwait(false);
                 await LanguageUpdater.UpdateLanguageAsync(vm, true).ConfigureAwait(false);

+ 1 - 2
src/PicView.Avalonia/Views/MainView.axaml.cs

@@ -11,7 +11,6 @@ using PicView.Avalonia.Navigation;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 using PicView.Core.Extensions;
 
 namespace PicView.Avalonia.Views;
@@ -103,7 +102,7 @@ public partial class MainView : UserControl
         {
             return;
         }
-        var isNavigatingWithCtrl = SettingsHelper.Settings.Zoom.CtrlZoom;
+        var isNavigatingWithCtrl = Settings.Zoom.CtrlZoom;
         vm.ChangeCtrlZoomImage = isNavigatingWithCtrl ? leftRightArrowsImage as DrawingImage : scanEyeImage as DrawingImage;
 
         // Update file history

+ 8 - 9
src/PicView.Avalonia/Views/MouseWheelView.axaml.cs

@@ -1,5 +1,4 @@
 using Avalonia.Controls;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views;
     public partial class MouseWheelView : UserControl
@@ -9,7 +8,7 @@ namespace PicView.Avalonia.Views;
             InitializeComponent();
             Loaded += delegate
             {
-                MouseWheelBox.SelectedIndex = SettingsHelper.Settings.Zoom.CtrlZoom ? 0 : 1;
+                MouseWheelBox.SelectedIndex = Settings.Zoom.CtrlZoom ? 0 : 1;
 
                 MouseWheelBox.SelectionChanged += async delegate
                 {
@@ -18,19 +17,19 @@ namespace PicView.Avalonia.Views;
                         return;
                     }
 
-                    SettingsHelper.Settings.Zoom.CtrlZoom = MouseWheelBox.SelectedIndex == 0;
-                    await SettingsHelper.SaveSettingsAsync();
+                    Settings.Zoom.CtrlZoom = MouseWheelBox.SelectedIndex == 0;
+                    await SaveSettingsAsync();
                 };
                 MouseWheelBox.DropDownOpened += delegate
                 {
                     if (MouseWheelBox.SelectedIndex == -1)
                     {
-                        MouseWheelBox.SelectedIndex = SettingsHelper.Settings.Zoom.CtrlZoom ? 0 : 1;
+                        MouseWheelBox.SelectedIndex = Settings.Zoom.CtrlZoom ? 0 : 1;
                     }
                 };
             };
             
-            ScrollDirectionBox.SelectedIndex = SettingsHelper.Settings.Zoom.HorizontalReverseScroll ? 0 : 1;
+            ScrollDirectionBox.SelectedIndex = Settings.Zoom.HorizontalReverseScroll ? 0 : 1;
             
             ScrollDirectionBox.SelectionChanged += async delegate
             {
@@ -38,14 +37,14 @@ namespace PicView.Avalonia.Views;
                 {
                     return;
                 }
-                SettingsHelper.Settings.Zoom.HorizontalReverseScroll = ScrollDirectionBox.SelectedIndex == 0;
-                await SettingsHelper.SaveSettingsAsync();
+                Settings.Zoom.HorizontalReverseScroll = ScrollDirectionBox.SelectedIndex == 0;
+                await SaveSettingsAsync();
             };
             ScrollDirectionBox.DropDownOpened += delegate
             {
                 if (ScrollDirectionBox.SelectedIndex == -1)
                 {
-                    ScrollDirectionBox.SelectedIndex = SettingsHelper.Settings.Zoom.HorizontalReverseScroll ? 0 : 1;
+                    ScrollDirectionBox.SelectedIndex = Settings.Zoom.HorizontalReverseScroll ? 0 : 1;
                 }
             };
         }

+ 1 - 2
src/PicView.Avalonia/Views/StartUpMenu.axaml.cs

@@ -8,7 +8,6 @@ using PicView.Avalonia.ColorManagement;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Core.Calculations;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views;
 
@@ -106,7 +105,7 @@ public partial class StartUpMenu : UserControl
         if (Application.Current?.ApplicationLifetime is not IClassicDesktopStyleApplicationLifetime desktop)
             return;
         
-        if (SettingsHelper.Settings.WindowProperties.AutoFit)
+        if (Settings.WindowProperties.AutoFit)
         {
             ShowIcon();
             vm.TitleMaxWidth = logoWidth;

+ 2 - 3
src/PicView.Avalonia/Views/UC/BottomGalleryItemSizeSlider.axaml.cs

@@ -4,7 +4,6 @@ using PicView.Avalonia.Gallery;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views.UC;
 
@@ -27,7 +26,7 @@ public partial class BottomGalleryItemSizeSlider : UserControl
         }
         vm.GetBottomGalleryItemHeight = e.NewValue;
         
-        if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown && !GalleryFunctions.IsFullGalleryOpen)
+        if (Settings.Gallery.IsBottomGalleryShown && !GalleryFunctions.IsFullGalleryOpen)
         {
             vm.GetGalleryItemHeight = e.NewValue;
             UIHelper.GetGalleryView.Height = vm.GalleryHeight;
@@ -36,6 +35,6 @@ public partial class BottomGalleryItemSizeSlider : UserControl
         
         // Binding to height depends on timing of the update. Maybe find a cleaner mvvm solution one day
         // Maybe save this on close or some other way
-        SettingsHelper.Settings.Gallery.BottomGalleryItemSize = e.NewValue;
+        Settings.Gallery.BottomGalleryItemSize = e.NewValue;
     }
 }

+ 1 - 2
src/PicView.Avalonia/Views/UC/Buttons/ClickArrowLeft.axaml.cs

@@ -1,7 +1,6 @@
 using Avalonia.Controls;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views.UC.Buttons;
 public partial class ClickArrowLeft : UserControl
@@ -20,7 +19,7 @@ public partial class ClickArrowLeft : UserControl
             
             // TODO add interval to mainviewmodel
             PolyButton.Interval =
-                (int)TimeSpan.FromSeconds(SettingsHelper.Settings.UIProperties.NavSpeed).TotalMilliseconds;
+                (int)TimeSpan.FromSeconds(Settings.UIProperties.NavSpeed).TotalMilliseconds;
         };
     }
 }

+ 1 - 2
src/PicView.Avalonia/Views/UC/Buttons/ClickArrowRight.axaml.cs

@@ -1,7 +1,6 @@
 using Avalonia.Controls;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views.UC.Buttons;
 public partial class ClickArrowRight : UserControl
@@ -20,7 +19,7 @@ public partial class ClickArrowRight : UserControl
             
             // TODO add interval to mainviewmodel
             PolyButton.Interval =
-                (int)TimeSpan.FromSeconds(SettingsHelper.Settings.UIProperties.NavSpeed).TotalMilliseconds;
+                (int)TimeSpan.FromSeconds(Settings.UIProperties.NavSpeed).TotalMilliseconds;
         };
     }
 }

+ 1 - 2
src/PicView.Avalonia/Views/UC/CropControl.axaml.cs

@@ -3,7 +3,6 @@ using Avalonia.Input;
 using Avalonia.Interactivity;
 using Avalonia.Media;
 using PicView.Avalonia.Crop;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views.UC;
 
@@ -32,7 +31,7 @@ public partial class CropControl : UserControl
 
     private void InitLoaded()
     {
-        if (SettingsHelper.Settings.Theme.GlassTheme)
+        if (Settings.Theme.GlassTheme)
         {
             var glassBrush = new SolidColorBrush(Color.FromArgb(120,225,225,225));
             var glassBrushAlt = new SolidColorBrush(Color.FromArgb(150,225,225,225));

+ 1 - 2
src/PicView.Avalonia/Views/UC/FullGalleryItemSizeSlider.axaml.cs

@@ -3,7 +3,6 @@ using Avalonia.Controls.Primitives;
 using PicView.Avalonia.Gallery;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views.UC;
 
@@ -34,6 +33,6 @@ public partial class FullGalleryItemSizeSlider : UserControl
         // Binding to height depends on timing of the update. Maybe find a cleaner mvvm solution one day
         
         // Maybe save this on close or some other way
-        SettingsHelper.Settings.Gallery.ExpandedGalleryItemSize = e.NewValue;
+        Settings.Gallery.ExpandedGalleryItemSize = e.NewValue;
     }
 }

+ 4 - 5
src/PicView.Avalonia/Views/UC/GalleryItemSizeSlider.axaml.cs

@@ -4,7 +4,6 @@ using PicView.Avalonia.Gallery;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Avalonia.WindowBehavior;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views.UC;
 
@@ -54,10 +53,10 @@ public partial class GalleryItemSizeSlider : UserControl
             // Binding to height depends on timing of the update. Maybe find a cleaner mvvm solution one day
         
             // Maybe save this on close or some other way
-            SettingsHelper.Settings.Gallery.ExpandedGalleryItemSize = e.NewValue;
+            Settings.Gallery.ExpandedGalleryItemSize = e.NewValue;
             
         }
-        else if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+        else if (Settings.Gallery.IsBottomGalleryShown)
         {
             // ReSharper disable once CompareOfFloatsByEqualityOperator
             if (vm.GetBottomGalleryItemHeight == e.NewValue)
@@ -72,9 +71,9 @@ public partial class GalleryItemSizeSlider : UserControl
         
             // Binding to height depends on timing of the update. Maybe find a cleaner mvvm solution one day
             // Maybe save this on close or some other way
-            SettingsHelper.Settings.Gallery.BottomGalleryItemSize = e.NewValue;
+            Settings.Gallery.BottomGalleryItemSize = e.NewValue;
         }
        
-        _ = SettingsHelper.SaveSettingsAsync();
+        _ = SaveSettingsAsync();
     }
 }

+ 2 - 3
src/PicView.Avalonia/Views/UC/Menus/FileMenu.axaml.cs

@@ -1,6 +1,5 @@
 using Avalonia.Media;
 using PicView.Avalonia.CustomControls;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views.UC.Menus;
 
@@ -11,10 +10,10 @@ public partial class FileMenu  : AnimatedMenu
         InitializeComponent();
         Loaded += (_, _) =>
         {
-            if (SettingsHelper.Settings.Theme.GlassTheme)
+            if (Settings.Theme.GlassTheme)
             {
             }
-            else if (!SettingsHelper.Settings.Theme.Dark)
+            else if (!Settings.Theme.Dark)
             {
                 TopBorder.Background = Brushes.White;
             }

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

@@ -5,7 +5,6 @@ using PicView.Avalonia.Crop;
 using PicView.Avalonia.CustomControls;
 using PicView.Avalonia.Navigation;
 using PicView.Avalonia.ViewModels;
-using PicView.Core.Config;
 using ReactiveUI;
 
 namespace PicView.Avalonia.Views.UC.Menus;
@@ -17,13 +16,13 @@ public partial class ImageMenu  : AnimatedMenu
         InitializeComponent();
         Loaded += delegate
         {
-            if (SettingsHelper.Settings.Theme.GlassTheme)
+            if (Settings.Theme.GlassTheme)
             {
                GoToPicButton.Classes.Remove("noBorderHover");
                GoToPicButton.Classes.Add("hover");
                GoToPicBox.Background = new SolidColorBrush(Color.FromArgb(90, 197, 197, 197));
             }
-            else if (!SettingsHelper.Settings.Theme.Dark)
+            else if (!Settings.Theme.Dark)
             {
                 TopBorder.Background = Brushes.White;
             }

+ 2 - 3
src/PicView.Avalonia/Views/UC/Menus/SettingsMenu.axaml.cs

@@ -1,6 +1,5 @@
 using Avalonia.Media;
 using PicView.Avalonia.CustomControls;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views.UC.Menus;
 
@@ -11,7 +10,7 @@ public partial class SettingsMenu : AnimatedMenu
         InitializeComponent();
         Loaded += (_, _) =>
         {
-            if (SettingsHelper.Settings.Theme.GlassTheme)
+            if (Settings.Theme.GlassTheme)
             {
                 SettingsButton.Classes.Remove("noBorderHover");
                 SettingsButton.Classes.Add("hover");
@@ -19,7 +18,7 @@ public partial class SettingsMenu : AnimatedMenu
                 AboutWindowButton.Classes.Remove("noBorderHover");
                 AboutWindowButton.Classes.Add("hover");
             }
-            else if (!SettingsHelper.Settings.Theme.Dark)
+            else if (!Settings.Theme.Dark)
             {
                 TopBorder.Background = Brushes.White;
             }

+ 2 - 3
src/PicView.Avalonia/Views/UC/Menus/ToolsMenu.axaml.cs

@@ -1,6 +1,5 @@
 using Avalonia.Media;
 using PicView.Avalonia.CustomControls;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views.UC.Menus;
 
@@ -11,7 +10,7 @@ public partial class ToolsMenu : AnimatedMenu
         InitializeComponent();
         Loaded += (_, _) =>
         {
-            if (SettingsHelper.Settings.Theme.GlassTheme)
+            if (Settings.Theme.GlassTheme)
             {
                 BatchResizeButton.Classes.Remove("noBorderHover");
                 BatchResizeButton.Classes.Add("hover");
@@ -19,7 +18,7 @@ public partial class ToolsMenu : AnimatedMenu
                 EffectsButton.Classes.Remove("noBorderHover");
                 EffectsButton.Classes.Add("hover");
             }
-            else if (!SettingsHelper.Settings.Theme.Dark)
+            else if (!Settings.Theme.Dark)
             {
                 TopBorder.Background = Brushes.White;
             }

+ 4 - 5
src/PicView.Avalonia/Views/ZoomSettingsView.axaml.cs

@@ -1,5 +1,4 @@
 using Avalonia.Controls;
-using PicView.Core.Config;
 
 namespace PicView.Avalonia.Views;
 
@@ -10,7 +9,7 @@ public partial class ZoomSettingsView : UserControl
         InitializeComponent();
         Loaded += delegate
         {
-            MouseWheelBox.SelectedIndex = SettingsHelper.Settings.Zoom.CtrlZoom ? 0 : 1;
+            MouseWheelBox.SelectedIndex = Settings.Zoom.CtrlZoom ? 0 : 1;
 
             MouseWheelBox.SelectionChanged += async delegate
             {
@@ -19,14 +18,14 @@ public partial class ZoomSettingsView : UserControl
                     return;
                 }
 
-                SettingsHelper.Settings.Zoom.CtrlZoom = MouseWheelBox.SelectedIndex == 0;
-                await SettingsHelper.SaveSettingsAsync();
+                Settings.Zoom.CtrlZoom = MouseWheelBox.SelectedIndex == 0;
+                await SaveSettingsAsync();
             };
             MouseWheelBox.DropDownOpened += delegate
             {
                 if (MouseWheelBox.SelectedIndex == -1)
                 {
-                    MouseWheelBox.SelectedIndex = SettingsHelper.Settings.Zoom.CtrlZoom ? 0 : 1;
+                    MouseWheelBox.SelectedIndex = Settings.Zoom.CtrlZoom ? 0 : 1;
                 }
             };
         };

+ 46 - 47
src/PicView.Avalonia/WindowBehavior/WindowFunctions.cs

@@ -10,7 +10,6 @@ using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Core.ArchiveHandling;
 using PicView.Core.Calculations;
-using PicView.Core.Config;
 using PicView.Core.FileHandling;
 
 namespace PicView.Avalonia.WindowBehavior;
@@ -57,8 +56,8 @@ public static class WindowFunctions
             lastFile = !string.IsNullOrWhiteSpace(url) ? url : FileHistoryNavigation.GetLastFile();
         }
 
-        SettingsHelper.Settings.StartUp.LastFile = lastFile;
-        await SettingsHelper.SaveSettingsAsync();
+        Settings.StartUp.LastFile = lastFile;
+        await SaveSettingsAsync();
         await KeybindingManager.UpdateKeyBindingsFile(); // Save keybindings
         FileDeletionHelper.DeleteTempFiles();
         FileHistoryNavigation.WriteToFile();
@@ -83,52 +82,52 @@ public static class WindowFunctions
             return;
         }
 
-        if (SettingsHelper.Settings.WindowProperties.TopMost)
+        if (Settings.WindowProperties.TopMost)
         {
             vm.IsTopMost = false;
             desktop.MainWindow.Topmost = false;
-            SettingsHelper.Settings.WindowProperties.TopMost = false;
+            Settings.WindowProperties.TopMost = false;
         }
         else
         {
             vm.IsTopMost = true;
             desktop.MainWindow.Topmost = true;
-            SettingsHelper.Settings.WindowProperties.TopMost = true;
+            Settings.WindowProperties.TopMost = true;
         }
 
-        await SettingsHelper.SaveSettingsAsync().ConfigureAwait(false);
+        await SaveSettingsAsync().ConfigureAwait(false);
     }
 
     public static async Task ToggleAutoFit(MainViewModel vm)
     {
-        if (SettingsHelper.Settings.WindowProperties.AutoFit)
+        if (Settings.WindowProperties.AutoFit)
         {
             vm.SizeToContent = SizeToContent.Manual;
             vm.CanResize = true;
-            SettingsHelper.Settings.WindowProperties.AutoFit = false;
+            Settings.WindowProperties.AutoFit = false;
             vm.IsAutoFit = false;
         }
         else
         {
             vm.SizeToContent = SizeToContent.WidthAndHeight;
             vm.CanResize = false;
-            SettingsHelper.Settings.WindowProperties.AutoFit = true;
+            Settings.WindowProperties.AutoFit = true;
             vm.IsAutoFit = true;
         }
 
         WindowResizing.SetSize(vm);
         await Dispatcher.UIThread.InvokeAsync(() => CenterWindowOnScreen(false));
-        await SettingsHelper.SaveSettingsAsync().ConfigureAwait(false);
+        await SaveSettingsAsync().ConfigureAwait(false);
     }
 
     public static async Task AutoFitAndStretch(MainViewModel vm)
     {
-        if (SettingsHelper.Settings.WindowProperties.AutoFit)
+        if (Settings.WindowProperties.AutoFit)
         {
             vm.SizeToContent = SizeToContent.Manual;
             vm.CanResize = true;
-            SettingsHelper.Settings.WindowProperties.AutoFit = false;
-            SettingsHelper.Settings.ImageScaling.StretchImage = false;
+            Settings.WindowProperties.AutoFit = false;
+            Settings.ImageScaling.StretchImage = false;
             vm.IsStretched = false;
             vm.IsAutoFit = false;
         }
@@ -136,46 +135,46 @@ public static class WindowFunctions
         {
             vm.SizeToContent = SizeToContent.WidthAndHeight;
             vm.CanResize = false;
-            SettingsHelper.Settings.WindowProperties.AutoFit = true;
-            SettingsHelper.Settings.ImageScaling.StretchImage = true;
+            Settings.WindowProperties.AutoFit = true;
+            Settings.ImageScaling.StretchImage = true;
             vm.IsAutoFit = true;
             vm.IsStretched = true;
         }
 
         WindowResizing.SetSize(vm);
         await Dispatcher.UIThread.InvokeAsync(() => CenterWindowOnScreen(false));
-        await SettingsHelper.SaveSettingsAsync().ConfigureAwait(false);
+        await SaveSettingsAsync().ConfigureAwait(false);
     }
 
     public static async Task NormalWindow(MainViewModel vm)
     {
         vm.SizeToContent = SizeToContent.Manual;
         vm.CanResize = true;
-        SettingsHelper.Settings.WindowProperties.AutoFit = false;
+        Settings.WindowProperties.AutoFit = false;
         WindowResizing.SetSize(vm);
         vm.ImageViewer.MainImage.InvalidateVisual();
-        await SettingsHelper.SaveSettingsAsync().ConfigureAwait(false);
+        await SaveSettingsAsync().ConfigureAwait(false);
     }
 
     public static async Task NormalWindowStretch(MainViewModel vm)
     {
         vm.SizeToContent = SizeToContent.Manual;
         vm.CanResize = true;
-        SettingsHelper.Settings.WindowProperties.AutoFit = false;
-        SettingsHelper.Settings.ImageScaling.StretchImage = true;
+        Settings.WindowProperties.AutoFit = false;
+        Settings.ImageScaling.StretchImage = true;
         vm.IsStretched = true;
         WindowResizing.SetSize(vm);
         vm.ImageViewer.MainImage.InvalidateVisual();
-        await SettingsHelper.SaveSettingsAsync().ConfigureAwait(false);
+        await SaveSettingsAsync().ConfigureAwait(false);
     }
 
     public static async Task Stretch(MainViewModel vm)
     {
-        SettingsHelper.Settings.ImageScaling.StretchImage = true;
+        Settings.ImageScaling.StretchImage = true;
         vm.IsStretched = true;
         WindowResizing.SetSize(vm);
         vm.ImageViewer.MainImage.InvalidateVisual();
-        await SettingsHelper.SaveSettingsAsync().ConfigureAwait(false);
+        await SaveSettingsAsync().ConfigureAwait(false);
     }
 
     public static async Task ToggleFullscreen(MainViewModel vm, bool saveSettings = true)
@@ -185,14 +184,14 @@ public static class WindowFunctions
             return;
         }
 
-        if (SettingsHelper.Settings.WindowProperties.Fullscreen)
+        if (Settings.WindowProperties.Fullscreen)
         {
             vm.IsFullscreen = false;
             await Dispatcher.UIThread.InvokeAsync(() =>
                 desktop.MainWindow.WindowState = WindowState.Normal);
             if (saveSettings)
             {
-                SettingsHelper.Settings.WindowProperties.Fullscreen = false;
+                Settings.WindowProperties.Fullscreen = false;
             }
 
             if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
@@ -207,11 +206,11 @@ public static class WindowFunctions
             Fullscreen(vm, desktop);
             if (saveSettings)
             {
-                SettingsHelper.Settings.WindowProperties.Fullscreen = true;
+                Settings.WindowProperties.Fullscreen = true;
             }
         }
 
-        await SettingsHelper.SaveSettingsAsync().ConfigureAwait(false);
+        await SaveSettingsAsync().ConfigureAwait(false);
     }
 
     public static async Task MaximizeRestore()
@@ -230,7 +229,7 @@ public static class WindowFunctions
         // Maximize
         else
         {
-            if (!SettingsHelper.Settings.WindowProperties.AutoFit)
+            if (!Settings.WindowProperties.AutoFit)
             {
                 WindowResizing.SaveSize(desktop.MainWindow);
             }
@@ -238,18 +237,18 @@ public static class WindowFunctions
             Maximize();
         }
 
-        await SettingsHelper.SaveSettingsAsync().ConfigureAwait(false);
+        await SaveSettingsAsync().ConfigureAwait(false);
     }
 
     public static void Restore(MainViewModel vm, IClassicDesktopStyleApplicationLifetime desktop)
     {
         if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
         {
-            if (SettingsHelper.Settings.UIProperties.ShowInterface)
+            if (Settings.UIProperties.ShowInterface)
             {
                 vm.IsTopToolbarShown = true;
                 vm.TitlebarHeight = SizeDefaults.TitlebarHeight;
-                if (SettingsHelper.Settings.UIProperties.ShowBottomNavBar)
+                if (Settings.UIProperties.ShowBottomNavBar)
                 {
                     vm.IsBottomToolbarShown = true;
                     vm.BottombarHeight = SizeDefaults.BottombarHeight;
@@ -261,12 +260,12 @@ public static class WindowFunctions
 
         Dispatcher.UIThread.InvokeAsync(() =>
             desktop.MainWindow.WindowState = WindowState.Normal);
-        SettingsHelper.Settings.WindowProperties.Maximized = false;
-        SettingsHelper.Settings.WindowProperties.Fullscreen = false;
-        vm.IsUIShown = SettingsHelper.Settings.UIProperties.ShowInterface;
+        Settings.WindowProperties.Maximized = false;
+        Settings.WindowProperties.Fullscreen = false;
+        vm.IsUIShown = Settings.UIProperties.ShowInterface;
         InitializeWindowSizeAndPosition(desktop.MainWindow);
         WindowResizing.SetSize(vm);
-        if (SettingsHelper.Settings.WindowProperties.AutoFit)
+        if (Settings.WindowProperties.AutoFit)
         {
             vm.SizeToContent = SizeToContent.WidthAndHeight;
             vm.CanResize = false;
@@ -302,7 +301,7 @@ public static class WindowFunctions
             }
 
             var vm = desktop.MainWindow.DataContext as MainViewModel;
-            if (SettingsHelper.Settings.WindowProperties.AutoFit)
+            if (Settings.WindowProperties.AutoFit)
             {
                 vm.SizeToContent = SizeToContent.Manual;
                 vm.CanResize = true;
@@ -310,7 +309,7 @@ public static class WindowFunctions
 
             desktop.MainWindow.WindowState = WindowState.Maximized;
             WindowResizing.SetSize(desktop.MainWindow.DataContext as MainViewModel);
-            SettingsHelper.Settings.WindowProperties.Maximized = true;
+            Settings.WindowProperties.Maximized = true;
         }
     }
 
@@ -370,7 +369,7 @@ public static class WindowFunctions
         }
         else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
         {
-            if (SettingsHelper.Settings.WindowProperties.AutoFit)
+            if (Settings.WindowProperties.AutoFit)
             {
                 // TODO go to macOS fullscreen mode when auto fit is on
             }
@@ -453,19 +452,19 @@ public static class WindowFunctions
     {
         if (Dispatcher.UIThread.CheckAccess())
         {
-            window.Position = new PixelPoint((int)SettingsHelper.Settings.WindowProperties.Left,
-                (int)SettingsHelper.Settings.WindowProperties.Top);
-            window.Width = SettingsHelper.Settings.WindowProperties.Width;
-            window.Height = SettingsHelper.Settings.WindowProperties.Height;
+            window.Position = new PixelPoint((int)Settings.WindowProperties.Left,
+                (int)Settings.WindowProperties.Top);
+            window.Width = Settings.WindowProperties.Width;
+            window.Height = Settings.WindowProperties.Height;
         }
         else
         {
             Dispatcher.UIThread.InvokeAsync(() =>
             {
-                window.Position = new PixelPoint((int)SettingsHelper.Settings.WindowProperties.Left,
-                    (int)SettingsHelper.Settings.WindowProperties.Top);
-                window.Width = SettingsHelper.Settings.WindowProperties.Width;
-                window.Height = SettingsHelper.Settings.WindowProperties.Height;
+                window.Position = new PixelPoint((int)Settings.WindowProperties.Left,
+                    (int)Settings.WindowProperties.Top);
+                window.Width = Settings.WindowProperties.Width;
+                window.Height = Settings.WindowProperties.Height;
             });
         }
     }

+ 15 - 16
src/PicView.Avalonia/WindowBehavior/WindowResizing.cs

@@ -8,7 +8,6 @@ using PicView.Avalonia.Preloading;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.ViewModels;
 using PicView.Core.Calculations;
-using PicView.Core.Config;
 using PicView.Core.Navigation;
 
 namespace PicView.Avalonia.WindowBehavior;
@@ -19,7 +18,7 @@ public static class WindowResizing
 
     public static void HandleWindowResize(Window window, AvaloniaPropertyChangedEventArgs<Size> size)
     {
-        if (!SettingsHelper.Settings.WindowProperties.AutoFit)
+        if (!Settings.WindowProperties.AutoFit)
         {
             return;
         }
@@ -82,7 +81,7 @@ public static class WindowResizing
             firstHeight = GetHeight(preloadValue);
         }
 
-        if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide)
+        if (Settings.ImageScaling.ShowImageSideBySide)
         {
             var secondaryPreloadValue = vm.ImageIterator?.GetNextPreLoadValue();
             double secondWidth, secondHeight;
@@ -171,7 +170,7 @@ public static class WindowResizing
         }
 
         ImageSizeCalculationHelper.ImageSize size;
-        if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide && secondWidth > 0 && secondHeight > 0)
+        if (Settings.ImageScaling.ShowImageSideBySide && secondWidth > 0 && secondHeight > 0)
         {
             size = ImageSizeCalculationHelper.GetImageSize(
                 width,
@@ -221,10 +220,10 @@ public static class WindowResizing
         vm.ScrollViewerWidth = size.ScrollViewerWidth;
         vm.ScrollViewerHeight = size.ScrollViewerHeight;
 
-        if (SettingsHelper.Settings.WindowProperties.AutoFit)
+        if (Settings.WindowProperties.AutoFit)
         {
-            if (SettingsHelper.Settings.WindowProperties.Fullscreen ||
-                SettingsHelper.Settings.WindowProperties.Maximized)
+            if (Settings.WindowProperties.Fullscreen ||
+                Settings.WindowProperties.Maximized)
             {
                 vm.GalleryWidth = double.NaN;
             }
@@ -245,7 +244,7 @@ public static class WindowResizing
 
     public static void SaveSize(Window window)
     {
-        if (SettingsHelper.Settings.WindowProperties.Maximized || SettingsHelper.Settings.WindowProperties.Fullscreen || SettingsHelper.Settings.WindowProperties.AutoFit)
+        if (Settings.WindowProperties.Maximized || Settings.WindowProperties.Fullscreen || Settings.WindowProperties.AutoFit)
             return;
             
         if (Dispatcher.UIThread.CheckAccess())
@@ -263,10 +262,10 @@ public static class WindowResizing
         {
             var top = window.Position.Y;
             var left = window.Position.X;
-            SettingsHelper.Settings.WindowProperties.Top = top;
-            SettingsHelper.Settings.WindowProperties.Left = left;
-            SettingsHelper.Settings.WindowProperties.Width = window.Width;
-            SettingsHelper.Settings.WindowProperties.Height = window.Height;
+            Settings.WindowProperties.Top = top;
+            Settings.WindowProperties.Left = left;
+            Settings.WindowProperties.Width = window.Width;
+            Settings.WindowProperties.Height = window.Height;
         }
     }
 
@@ -285,11 +284,11 @@ public static class WindowResizing
 
         void Set()
         {
-            var x = (int)SettingsHelper.Settings.WindowProperties.Left;
-            var y = (int)SettingsHelper.Settings.WindowProperties.Top;
+            var x = (int)Settings.WindowProperties.Left;
+            var y = (int)Settings.WindowProperties.Top;
             window.Position = new PixelPoint(x, y);
-            window.Width = SettingsHelper.Settings.WindowProperties.Width;
-            window.Height = SettingsHelper.Settings.WindowProperties.Height;
+            window.Width = Settings.WindowProperties.Width;
+            window.Height = Settings.WindowProperties.Height;
         }
     }
 

+ 24 - 25
src/PicView.Core/Calculations/ImageSizeCalculationHelper.cs

@@ -1,5 +1,4 @@
 using System.Runtime.InteropServices;
-using PicView.Core.Config;
 
 namespace PicView.Core.Calculations
 {
@@ -39,8 +38,8 @@ namespace PicView.Core.Calculations
             double maxWidth, maxHeight;
             var margin = 0d;
 
-            var fullscreen = SettingsHelper.Settings.WindowProperties.Fullscreen ||
-                             SettingsHelper.Settings.WindowProperties.Maximized;
+            var fullscreen = Settings.WindowProperties.Fullscreen ||
+                             Settings.WindowProperties.Maximized;
             
             var borderSpaceHeight = fullscreen ? 0 : uiTopSize + uiBottomSize + galleryHeight;
             var borderSpaceWidth = fullscreen ? 0 : padding;
@@ -48,7 +47,7 @@ namespace PicView.Core.Calculations
             var workAreaWidth = monitorWidth - borderSpaceWidth;
             var workAreaHeight = monitorHeight - borderSpaceHeight;
 
-            if (SettingsHelper.Settings.Zoom.ScrollEnabled)
+            if (Settings.Zoom.ScrollEnabled)
             {
                 workAreaWidth -= SizeDefaults.ScrollbarSize * dpiScaling;
                 containerWidth -= SizeDefaults.ScrollbarSize * dpiScaling;
@@ -56,32 +55,32 @@ namespace PicView.Core.Calculations
                 maxWidth = workAreaWidth - padding;
                 maxHeight = height;
             }
-            else if (SettingsHelper.Settings.WindowProperties.AutoFit)
+            else if (Settings.WindowProperties.AutoFit)
             {
-                maxWidth = SettingsHelper.Settings.ImageScaling.StretchImage
+                maxWidth = Settings.ImageScaling.StretchImage
                     ? workAreaWidth - padding
                     : Math.Min(workAreaWidth - padding, width);
                     
-                maxHeight = SettingsHelper.Settings.ImageScaling.StretchImage
+                maxHeight = Settings.ImageScaling.StretchImage
                     ? workAreaHeight - padding
                     : Math.Min(workAreaHeight - padding, height);
             }
             else
             {
-                maxWidth = SettingsHelper.Settings.ImageScaling.StretchImage
+                maxWidth = Settings.ImageScaling.StretchImage
                     ? containerWidth
                     : Math.Min(containerWidth, width);
 
-                maxHeight = SettingsHelper.Settings.ImageScaling.StretchImage
+                maxHeight = Settings.ImageScaling.StretchImage
                     ? containerHeight - galleryHeight
                     : Math.Min(containerHeight - galleryHeight, height);
             }
 
-            if (SettingsHelper.Settings.Gallery.IsBottomGalleryShown)
+            if (Settings.Gallery.IsBottomGalleryShown)
             {
-                if (!SettingsHelper.Settings.UIProperties.ShowInterface)
+                if (!Settings.UIProperties.ShowInterface)
                 {
-                    if (SettingsHelper.Settings.Gallery.ShowBottomGalleryInHiddenUI)
+                    if (Settings.Gallery.ShowBottomGalleryInHiddenUI)
                     {
                         margin = galleryHeight > 0 ? galleryHeight : 0;
                     }
@@ -122,9 +121,9 @@ namespace PicView.Core.Calculations
             // Fit image by aspect ratio calculation
             // and update values
             double scrollWidth, scrollHeight, xWidth, xHeight;
-            if (SettingsHelper.Settings.Zoom.ScrollEnabled)
+            if (Settings.Zoom.ScrollEnabled)
             {
-                if (SettingsHelper.Settings.WindowProperties.AutoFit)
+                if (Settings.WindowProperties.AutoFit)
                 {
                     xWidth = maxWidth - SizeDefaults.ScrollbarSize - 10;
                     xHeight = maxWidth * height / width;
@@ -200,9 +199,9 @@ namespace PicView.Core.Calculations
             // Combined width of both images
             var combinedWidth = xWidth1 + xWidth2;
 
-            if (SettingsHelper.Settings.WindowProperties.AutoFit)
+            if (Settings.WindowProperties.AutoFit)
             {
-                var widthPadding = SettingsHelper.Settings.ImageScaling.StretchImage ? 4 : padding;
+                var widthPadding = Settings.ImageScaling.StretchImage ? 4 : padding;
                 var availableWidth = monitorWidth - widthPadding;
                 var availableHeight = monitorHeight - (widthPadding + uiBottomSize + uiTopSize);
                 if (rotationAngle is 0 or 180)
@@ -261,18 +260,18 @@ namespace PicView.Core.Calculations
             }
 
             double scrollWidth, scrollHeight;
-            if (SettingsHelper.Settings.Zoom.ScrollEnabled)
+            if (Settings.Zoom.ScrollEnabled)
             {
-                if (SettingsHelper.Settings.WindowProperties.AutoFit)
+                if (Settings.WindowProperties.AutoFit)
                 {
                     combinedWidth -= SizeDefaults.ScrollbarSize;
                     scrollWidth = combinedWidth + SizeDefaults.ScrollbarSize + 8;
 
-                    var fullscreen = SettingsHelper.Settings.WindowProperties.Fullscreen ||
-                                     SettingsHelper.Settings.WindowProperties.Maximized;
+                    var fullscreen = Settings.WindowProperties.Fullscreen ||
+                                     Settings.WindowProperties.Maximized;
                     var borderSpaceHeight = fullscreen ? 0 : uiTopSize + uiBottomSize + galleryHeight;
                     var workAreaHeight = monitorHeight * dpiScaling - borderSpaceHeight;
-                    scrollHeight = SettingsHelper.Settings.ImageScaling.StretchImage
+                    scrollHeight = Settings.ImageScaling.StretchImage
                         ? workAreaHeight
                         : workAreaHeight - padding;
                 }
@@ -302,10 +301,10 @@ namespace PicView.Core.Calculations
             double monitorMinHeight, double interfaceSize, double containerWidth, double dpiScaling)
         {
             double titleMaxWidth;
-            var maximized = SettingsHelper.Settings.WindowProperties.Fullscreen ||
-                            SettingsHelper.Settings.WindowProperties.Maximized;
+            var maximized = Settings.WindowProperties.Fullscreen ||
+                            Settings.WindowProperties.Maximized;
 
-            if (SettingsHelper.Settings.WindowProperties.AutoFit && !maximized)
+            if (Settings.WindowProperties.AutoFit && !maximized)
             {
                 switch (rotationAngle)
                 {
@@ -330,7 +329,7 @@ namespace PicView.Core.Calculations
                     ? interfaceSize
                     : titleMaxWidth - interfaceSize;
 
-                if (SettingsHelper.Settings.Zoom.ScrollEnabled)
+                if (Settings.Zoom.ScrollEnabled)
                 {
                     titleMaxWidth += SizeDefaults.ScrollbarSize + 4;
                 }

+ 2 - 3
src/PicView.Core/FileHandling/FileListHelper.cs

@@ -1,5 +1,4 @@
 using System.Diagnostics;
-using PicView.Core.Config;
 
 namespace PicView.Core.FileHandling;
 
@@ -48,7 +47,7 @@ public static class FileListHelper
 
     public static SortFilesBy GetSortOrder()
     {
-        return SettingsHelper.Settings.Sorting.SortPreference switch
+        return Settings.Sorting.SortPreference switch
         {
             0 => SortFilesBy.Name,
             1 => SortFilesBy.FileSize,
@@ -77,7 +76,7 @@ public static class FileListHelper
         string[] enumerable;
         // Check if the subdirectories are to be included in the search
         var recurseSubdirectories =
-            SettingsHelper.Settings.Sorting.IncludeSubDirectories && string.IsNullOrWhiteSpace(TempFileHelper.TempFilePath);
+            Settings.Sorting.IncludeSubDirectories && string.IsNullOrWhiteSpace(TempFileHelper.TempFilePath);
         try
         {
             // Get the list of files in the directory

+ 1 - 0
src/PicView.Core/GlobalUsings.cs

@@ -0,0 +1 @@
+global using static PicView.Core.Config.SettingsHelper;

+ 3 - 4
src/PicView.Core/Localization/TranslationHelper.cs

@@ -2,7 +2,6 @@
 using System.Globalization;
 using System.Text.Json;
 using System.Text.Json.Serialization;
-using PicView.Core.Config;
 
 namespace PicView.Core.Localization;
 
@@ -83,7 +82,7 @@ public static class TranslationHelper
     public static async Task DetermineAndLoadLanguage()
     {
         var isoLanguageCode = DetermineCorrectLanguage();
-        SettingsHelper.Settings.UIProperties.UserLanguage = isoLanguageCode;
+        Settings.UIProperties.UserLanguage = isoLanguageCode;
         await LoadLanguage(isoLanguageCode).ConfigureAwait(false);
     }
 
@@ -105,9 +104,9 @@ public static class TranslationHelper
     {
         var choice = (Languages)language;
         var languageCode = choice.ToString().Replace('_', '-');
-        SettingsHelper.Settings.UIProperties.UserLanguage = languageCode;
+        Settings.UIProperties.UserLanguage = languageCode;
         await LoadLanguage(languageCode).ConfigureAwait(false);
-        await SettingsHelper.SaveSettingsAsync().ConfigureAwait(false);
+        await SaveSettingsAsync().ConfigureAwait(false);
     }
 
     /// <summary>

+ 2 - 4
src/PicView.Core/Navigation/ImageIteration.cs

@@ -1,6 +1,4 @@
-using PicView.Core.Config;
-
-namespace PicView.Core.Navigation;
+namespace PicView.Core.Navigation;
 
 public enum NavigateTo
 {
@@ -20,7 +18,7 @@ public static class ImageIteration
             case NavigateTo.Previous:
                 var indexChange = navigateTo == NavigateTo.Next ? 1 : -1;
 
-                if (SettingsHelper.Settings.UIProperties.Looping || loop)
+                if (Settings.UIProperties.Looping || loop)
                 {
                     return (index + indexChange + list.Count) % list.Count;
                 }

+ 2 - 1
src/PicView.Tests/GlobalUsings.cs

@@ -1 +1,2 @@
-global using Xunit;
+global using Xunit;
+global using static PicView.Core.Config.SettingsHelper;