diff --git a/src/PicView.Avalonia.Win32/App.axaml.cs b/src/PicView.Avalonia.Win32/App.axaml.cs index dbe42c9f..3a23a7ed 100644 --- a/src/PicView.Avalonia.Win32/App.axaml.cs +++ b/src/PicView.Avalonia.Win32/App.axaml.cs @@ -62,7 +62,18 @@ public override async void OnFrameworkInitializationCompleted() await Dispatcher.UIThread.InvokeAsync(() => { - Current.RequestedThemeVariant = SettingsHelper.Settings.Theme.Dark ? ThemeVariant.Dark : ThemeVariant.Light; + if (SettingsHelper.Settings.Theme.GlassTheme) + { + Current.RequestedThemeVariant = ThemeVariant.Light; + } + else if (SettingsHelper.Settings.Theme.UseSystemTheme) + { + Current.RequestedThemeVariant = ThemeVariant.Dark; // TODO : Figure out how to get the system theme + } + else + { + Current.RequestedThemeVariant = SettingsHelper.Settings.Theme.Dark ? ThemeVariant.Dark : ThemeVariant.Light; + } _mainWindow = new WinMainWindow(); desktop.MainWindow = _mainWindow; }); diff --git a/src/PicView.Avalonia.Win32/Views/AboutWindow.axaml b/src/PicView.Avalonia.Win32/Views/AboutWindow.axaml index 3936985f..45e3da29 100644 --- a/src/PicView.Avalonia.Win32/Views/AboutWindow.axaml +++ b/src/PicView.Avalonia.Win32/Views/AboutWindow.axaml @@ -21,7 +21,8 @@ BorderBrush="{DynamicResource WindowBorderColor}" BorderThickness="1" CornerRadius="8" - PointerPressed="MoveWindow"> + PointerPressed="MoveWindow" + x:Name="ParentBorder"> @@ -41,42 +42,42 @@ + x:Name="TitleText" /> - + CornerRadius="0,0,8,8" + PointerPressed="MoveWindow" + x:Name="ParentBorder"> + + VerticalAlignment="Center" + x:Name="DuplicateText" /> @@ -126,7 +138,7 @@ Click="Minimize" Data="{StaticResource MinimizeGeometry}" DockPanel.Dock="Right" - Foreground="{StaticResource SecondaryTextColor}" + Foreground="{DynamicResource MainTextColor}" IconHeight="12" IconWidth="12" Width="29" @@ -140,7 +152,7 @@ Click="Close" Data="{StaticResource CloseGeometry}" DockPanel.Dock="Right" - Foreground="{StaticResource SecondaryTextColor}" + Foreground="{DynamicResource MainTextColor}" IconHeight="10" IconWidth="10" Width="29" diff --git a/src/PicView.Avalonia.Win32/Views/ExifWindow.axaml.cs b/src/PicView.Avalonia.Win32/Views/ExifWindow.axaml.cs index e1a555aa..ff5a4012 100644 --- a/src/PicView.Avalonia.Win32/Views/ExifWindow.axaml.cs +++ b/src/PicView.Avalonia.Win32/Views/ExifWindow.axaml.cs @@ -13,7 +13,7 @@ public partial class ExifWindow : Window public ExifWindow() { InitializeComponent(); - if (!SettingsHelper.Settings.Theme.Dark) + if (SettingsHelper.Settings.Theme.GlassTheme) { TopWindowBorder.Background = Brushes.Transparent; @@ -21,6 +21,29 @@ public ExifWindow() CloseButton.BorderThickness = new Thickness(0); MinimizeButton.Background = Brushes.Transparent; MinimizeButton.BorderThickness = new Thickness(0); + + if (!Application.Current.TryGetResource("SecondaryTextColor", + Application.Current.RequestedThemeVariant, out var textColor)) + { + return; + } + + if (textColor is not Color color) + { + return; + } + + MinimizeButton.Foreground = new SolidColorBrush(color); + CloseButton.Foreground = new SolidColorBrush(color); + RecycleText.Foreground = new SolidColorBrush(color); + DuplicateText.Foreground = new SolidColorBrush(color); + OptimizeText.Foreground = new SolidColorBrush(color); + OpenWithText.Foreground = new SolidColorBrush(color); + LocateOnDiskText.Foreground = new SolidColorBrush(color); + } + else if (!SettingsHelper.Settings.Theme.Dark) + { + ParentBorder.Background = new SolidColorBrush(Color.FromArgb(114,132, 132, 132)); } Title = TranslationHelper.GetTranslation("ImageInfo") + " - PicView"; KeyDown += (_, e) => diff --git a/src/PicView.Avalonia.Win32/Views/KeybindingsWindow.axaml b/src/PicView.Avalonia.Win32/Views/KeybindingsWindow.axaml index 661617a5..472085d2 100644 --- a/src/PicView.Avalonia.Win32/Views/KeybindingsWindow.axaml +++ b/src/PicView.Avalonia.Win32/Views/KeybindingsWindow.axaml @@ -19,8 +19,9 @@ + CornerRadius="8" + PointerPressed="MoveWindow" + x:Name="ParentBorder"> @@ -34,6 +34,7 @@ Background="{DynamicResource WindowBackgroundColor}" BorderBrush="{DynamicResource MainBorderColor}" BorderThickness="0,0,1,1" + CornerRadius="8,8,0,0" DockPanel.Dock="Left" x:Name="TopWindowBorder"> + x:Name="TitleText" /> diff --git a/src/PicView.Avalonia.Win32/Views/SettingsWindow.axaml.cs b/src/PicView.Avalonia.Win32/Views/SettingsWindow.axaml.cs index 8f249991..52e9303b 100644 --- a/src/PicView.Avalonia.Win32/Views/SettingsWindow.axaml.cs +++ b/src/PicView.Avalonia.Win32/Views/SettingsWindow.axaml.cs @@ -13,7 +13,7 @@ public partial class SettingsWindow : Window public SettingsWindow() { InitializeComponent(); - if (!SettingsHelper.Settings.Theme.Dark) + if (SettingsHelper.Settings.Theme.GlassTheme) { TopWindowBorder.Background = Brushes.Transparent; TopWindowBorder.BorderThickness = new Thickness(0); @@ -23,7 +23,26 @@ public SettingsWindow() MinimizeButton.Background = Brushes.Transparent; MinimizeButton.BorderThickness = new Thickness(0); - SettingsText.Background = Brushes.Transparent; + TitleText.Background = Brushes.Transparent; + + if (!Application.Current.TryGetResource("SecondaryTextColor", + Application.Current.RequestedThemeVariant, out var textColor)) + { + return; + } + + if (textColor is not Color color) + { + return; + } + + TitleText.Foreground = new SolidColorBrush(color); + MinimizeButton.Foreground = new SolidColorBrush(color); + CloseButton.Foreground = new SolidColorBrush(color); + } + else if (!SettingsHelper.Settings.Theme.Dark) + { + ParentBorder.Background = new SolidColorBrush(Color.FromArgb(114,132, 132, 132)); } Loaded += delegate { diff --git a/src/PicView.Avalonia.Win32/Views/WinMainWindow.axaml b/src/PicView.Avalonia.Win32/Views/WinMainWindow.axaml index 417bf517..f8e9a761 100644 --- a/src/PicView.Avalonia.Win32/Views/WinMainWindow.axaml +++ b/src/PicView.Avalonia.Win32/Views/WinMainWindow.axaml @@ -33,7 +33,7 @@ - + \ No newline at end of file diff --git a/src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml b/src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml index 72c1ed4a..f7c380d3 100644 --- a/src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml +++ b/src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml @@ -21,18 +21,20 @@ + CornerRadius="8,8,0,0" + x:Name="TopWindowBorder"> + DockPanel.Dock="Left" + x:Name="LogoBorder"> + Width="30" + x:Name="GalleryButton" /> + Width="30" + x:Name="RotateLeftButton" /> + Width="30" + x:Name="FlipButton"> + Width="35" + x:Name="CloseButton" /> + Width="35" + x:Name="RestoreButton" /> + Width="35" + x:Name="MinimizeButton" /> diff --git a/src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml.cs b/src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml.cs index a5c01abb..a4339630 100644 --- a/src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml.cs +++ b/src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml.cs @@ -1,7 +1,10 @@ +using Avalonia; using Avalonia.Controls; using Avalonia.Input; +using Avalonia.Media; using PicView.Avalonia.UI; using PicView.Avalonia.ViewModels; +using PicView.Core.Config; namespace PicView.Avalonia.Win32.Views; @@ -10,11 +13,77 @@ public partial class WinTitleBar : UserControl public WinTitleBar() { InitializeComponent(); - PointerPressed += (_, e) => MoveWindow(e); - PointerExited += (_, _) => + Loaded += (_, _) => { - DragAndDropHelper.RemoveDragDropView(); + if (SettingsHelper.Settings.Theme.GlassTheme) + { + TopWindowBorder.Background = Brushes.Transparent; + TopWindowBorder.BorderThickness = new Thickness(0); + + LogoBorder.Background = Brushes.Transparent; + LogoBorder.BorderThickness = new Thickness(0); + + LogoBorder.Background = Brushes.Transparent; + LogoBorder.BorderThickness = new Thickness(0); + + EditableTitlebar.Background = Brushes.Transparent; + EditableTitlebar.BorderThickness = new Thickness(0); + + CloseButton.Background = Brushes.Transparent; + CloseButton.BorderThickness = new Thickness(0); + + MinimizeButton.Background = Brushes.Transparent; + MinimizeButton.BorderThickness = new Thickness(0); + + RestoreButton.Background = Brushes.Transparent; + RestoreButton.BorderThickness = new Thickness(0); + + FlipButton.Background = Brushes.Transparent; + FlipButton.BorderThickness = new Thickness(0); + + GalleryButton.Background = Brushes.Transparent; + GalleryButton.BorderThickness = new Thickness(0); + + RotateRightButton.Background = Brushes.Transparent; + RotateRightButton.BorderThickness = new Thickness(0); + + if (!Application.Current.TryGetResource("SecondaryTextColor", Application.Current.RequestedThemeVariant, out var color)) + { + return; + } + + if (color is not Color secondaryTextColor) + { + return; + } + + try + { + EditableTitlebar.Foreground = new SolidColorBrush(secondaryTextColor); + CloseButton.Foreground = new SolidColorBrush(secondaryTextColor); + MinimizeButton.Foreground = new SolidColorBrush(secondaryTextColor); + RestoreButton.Foreground = new SolidColorBrush(secondaryTextColor); + FlipButton.Foreground = new SolidColorBrush(secondaryTextColor); + GalleryButton.Foreground = new SolidColorBrush(secondaryTextColor); + RotateRightButton.Foreground = new SolidColorBrush(secondaryTextColor); + } + #if DEBUG + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + #else + catch (Exception) { } + #endif + } + PointerPressed += (_, e) => MoveWindow(e); + PointerExited += (_, _) => + { + DragAndDropHelper.RemoveDragDropView(); + }; }; + } private void MoveWindow(PointerPressedEventArgs e) diff --git a/src/PicView.Avalonia/ColorManagement/BackgroundManager.cs b/src/PicView.Avalonia/ColorManagement/BackgroundManager.cs index 82ab6dc7..5ea87c48 100644 --- a/src/PicView.Avalonia/ColorManagement/BackgroundManager.cs +++ b/src/PicView.Avalonia/ColorManagement/BackgroundManager.cs @@ -12,7 +12,7 @@ public static void ChangeBackground(MainViewModel vm) { return; } - SettingsHelper.Settings.UIProperties.BgColorChoice = (SettingsHelper.Settings.UIProperties.BgColorChoice + 1) % 9; + SettingsHelper.Settings.UIProperties.BgColorChoice = (SettingsHelper.Settings.UIProperties.BgColorChoice + 1) % 10; vm.ImageBackground = BackgroundColorBrush; } @@ -24,17 +24,33 @@ public static void SetBackground(MainViewModel vm) private static Brush BackgroundColorBrush => SettingsHelper.Settings.UIProperties.BgColorChoice switch { 0 => new SolidColorBrush(Colors.Transparent), - 1 => CreateCheckerboardBrush(), - 2 => CreateCheckerboardBrush(Color.FromRgb(235, 235, 235), Color.FromRgb(40, 40, 40), 60), - 3 => new SolidColorBrush(Colors.White), - 4 => new SolidColorBrush(Color.FromRgb(200, 200, 200)), - 5 => new SolidColorBrush(Color.FromRgb(155, 155, 155)), - 6 => new SolidColorBrush(Color.FromArgb(90,35, 35, 35)), - 7 => new SolidColorBrush(Color.FromArgb(90, 15, 15, 15)), - 8 => new SolidColorBrush(Color.FromRgb(5, 5, 5)), + 1 => GetNoiseTextureBrush(), + 2 => CreateCheckerboardBrush(), + 3 => CreateCheckerboardBrush(Color.FromRgb(235, 235, 235), Color.FromRgb(40, 40, 40), 60), + 4 => new SolidColorBrush(Colors.White), + 5 => new SolidColorBrush(Color.FromRgb(200, 200, 200)), + 6 => new SolidColorBrush(Color.FromRgb(155, 155, 155)), + 7 => new SolidColorBrush(Color.FromArgb(90,35, 35, 35)), + 8 => new SolidColorBrush(Color.FromArgb(90, 15, 15, 15)), + 9 => new SolidColorBrush(Color.FromRgb(5, 5, 5)), _ => new SolidColorBrush(Colors.Transparent), }; - + + private static Brush GetNoiseTextureBrush() + { + if (!Application.Current.TryGetResource("NoisyTexture", Application.Current.RequestedThemeVariant, + out var texture)) + { + return new SolidColorBrush(Colors.Transparent); + } + + if (texture is ImageBrush imageBrush) + { + return imageBrush; + } + return new SolidColorBrush(Colors.Transparent); + } + private static DrawingBrush CreateCheckerboardBrush(Color primaryColor = default, Color secondaryColor = default, int size = 30) { if (primaryColor == default) diff --git a/src/PicView.Avalonia/ColorManagement/ThemeManager.cs b/src/PicView.Avalonia/ColorManagement/ThemeManager.cs index cf23a2d0..0571f45d 100644 --- a/src/PicView.Avalonia/ColorManagement/ThemeManager.cs +++ b/src/PicView.Avalonia/ColorManagement/ThemeManager.cs @@ -5,12 +5,14 @@ namespace PicView.Avalonia.ColorManagement; public static class ThemeManager { - public static void ChangeTheme() + public enum Theme { - SetTheme(SettingsHelper.Settings.Theme.Dark); + Dark = 0, + Light = 1, + Glass = 2 } - public static void SetTheme(bool dark) + public static void SetTheme(Theme theme) { var application = Application.Current; if (application is null) @@ -18,15 +20,22 @@ public static void SetTheme(bool dark) // StyleInclude breaks trimming and AOT - if (dark) + switch (theme) { - SettingsHelper.Settings.Theme.Dark = true; - application.RequestedThemeVariant = ThemeVariant.Dark; - } - else - { - SettingsHelper.Settings.Theme.Dark = false; - application.RequestedThemeVariant = ThemeVariant.Light; + default: + SettingsHelper.Settings.Theme.Dark = true; + SettingsHelper.Settings.Theme.GlassTheme = false; + application.RequestedThemeVariant = ThemeVariant.Dark; + break; + case Theme.Light: + SettingsHelper.Settings.Theme.Dark = false; + SettingsHelper.Settings.Theme.GlassTheme = false; + application.RequestedThemeVariant = ThemeVariant.Light; + break; + case Theme.Glass: + SettingsHelper.Settings.Theme.GlassTheme = true; + application.RequestedThemeVariant = ThemeVariant.Light; + break; } ColorManager.UpdateAccentColors(SettingsHelper.Settings.Theme.ColorTheme); diff --git a/src/PicView.Avalonia/CustomControls/IconButton.cs b/src/PicView.Avalonia/CustomControls/IconButton.cs index ad864926..4ce257bc 100644 --- a/src/PicView.Avalonia/CustomControls/IconButton.cs +++ b/src/PicView.Avalonia/CustomControls/IconButton.cs @@ -2,7 +2,9 @@ using Avalonia; using Avalonia.Controls; using Avalonia.Media; +using Avalonia.Metadata; using Avalonia.Threading; +using PicView.Core.Config; namespace PicView.Avalonia.CustomControls; @@ -48,6 +50,7 @@ public class IconButton : Button /// /// Gets or sets the displayed as the icon of the button. /// + [Content] public DrawingImage? Icon { get => (DrawingImage?)GetValue(IconProperty); @@ -91,6 +94,16 @@ protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e) Content = BuildIcon(); } + protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) + { + base.OnPropertyChanged(change); + + if (change.Property == IconProperty) + { + Content = BuildIcon(); + } + } + /// /// Builds the icon for the button, either from a or a . /// It also sets up dynamic brush updates on mouse hover. @@ -103,7 +116,25 @@ protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e) // Set the initial pen brush to match the Foreground color foreach (var drawing in drawingGroup.Children) { - if (drawing is GeometryDrawing { Pen: Pen pen }) + if (drawing is not GeometryDrawing { Pen: Pen pen }) + { + continue; + } + + if (SettingsHelper.Settings.Theme.GlassTheme) + { + if (!Application.Current.TryGetResource("SecondaryTextColor", + Application.Current.RequestedThemeVariant, out var secondaryAccentColor)) + { + continue; + } + + if (secondaryAccentColor is Color color) + { + pen.Brush = new SolidColorBrush(color); + } + } + else { pen.Brush = Foreground; } @@ -142,6 +173,10 @@ protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e) // Revert brush to main text color on pointer exit PointerExited += delegate { + if (SettingsHelper.Settings.Theme.GlassTheme) + { +return; + } Dispatcher.UIThread.InvokeAsync(() => { if (!Application.Current.TryGetResource("MainTextColor", Application.Current.RequestedThemeVariant, diff --git a/src/PicView.Avalonia/Navigation/ImageIterator.cs b/src/PicView.Avalonia/Navigation/ImageIterator.cs index acd998f0..3f659061 100644 --- a/src/PicView.Avalonia/Navigation/ImageIterator.cs +++ b/src/PicView.Avalonia/Navigation/ImageIterator.cs @@ -493,54 +493,44 @@ public async Task IterateToIndex(int index) ErrorHandling.ShowStartUpMenu(_vm); return; } - - try + // UI is more responsive when started in new thread + await Task.Run(async () => { - lock (_lock) - { - CurrentIndex = index; - } - - // ReSharper disable once MethodHasAsyncOverload - var preloadValue = PreLoader.Get(index, ImagePaths); - if (preloadValue is not null) + try { - if (preloadValue.IsLoading) + lock (_lock) { - TryShowPreview(preloadValue); + CurrentIndex = index; } - while (preloadValue.IsLoading) + // ReSharper disable once MethodHasAsyncOverload + var preloadValue = PreLoader.Get(index, ImagePaths); + if (preloadValue is not null) { - await Task.Delay(20).ConfigureAwait(false); - lock (_lock) + if (preloadValue.IsLoading) { - if (CurrentIndex != index) + TryShowPreview(preloadValue); + } + + while (preloadValue.IsLoading) + { + await Task.Delay(20).ConfigureAwait(false); + lock (_lock) { - // Skip loading if user went to next value - return; + if (CurrentIndex != index) + { + // Skip loading if user went to next value + return; + } } } } - } - else - { - TryShowPreview(preloadValue); - preloadValue = await PreLoader.GetAsync(CurrentIndex, ImagePaths).ConfigureAwait(false); - } - - lock (_lock) - { - if (CurrentIndex != index) + else { - // Skip loading if user went to next value - return; + TryShowPreview(preloadValue); + preloadValue = await PreLoader.GetAsync(CurrentIndex, ImagePaths).ConfigureAwait(false); } - } - if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide) - { - var nextPreloadValue = await GetNextPreLoadValueAsync().ConfigureAwait(false); lock (_lock) { if (CurrentIndex != index) @@ -550,80 +540,94 @@ public async Task IterateToIndex(int index) } } - _vm.SecondaryImageSource = nextPreloadValue.ImageModel.Image; - await UpdateImage.UpdateSource(_vm, index, ImagePaths, IsReversed, preloadValue, nextPreloadValue) - .ConfigureAwait(false); - } - else - { - await UpdateImage.UpdateSource(_vm, index, ImagePaths, IsReversed, preloadValue).ConfigureAwait(false); - } - - if (ImagePaths.Count > 1) - { - if (SettingsHelper.Settings.UIProperties.IsTaskbarProgressEnabled) + if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide) { - await Dispatcher.UIThread.InvokeAsync(() => + var nextPreloadValue = await GetNextPreLoadValueAsync().ConfigureAwait(false); + lock (_lock) { - _vm.PlatformService.SetTaskbarProgress((ulong)CurrentIndex, (ulong)ImagePaths.Count); - }); + if (CurrentIndex != index) + { + // Skip loading if user went to next value + return; + } + } + + _vm.SecondaryImageSource = nextPreloadValue.ImageModel.Image; + await UpdateImage.UpdateSource(_vm, index, ImagePaths, IsReversed, preloadValue, nextPreloadValue) + .ConfigureAwait(false); + } + else + { + await UpdateImage.UpdateSource(_vm, index, ImagePaths, IsReversed, preloadValue) + .ConfigureAwait(false); } - await PreLoader.PreLoadAsync(CurrentIndex, ImagePaths.Count, IsReversed, ImagePaths) - .ConfigureAwait(false); - } + if (ImagePaths.Count > 1) + { + if (SettingsHelper.Settings.UIProperties.IsTaskbarProgressEnabled) + { + await Dispatcher.UIThread.InvokeAsync(() => + { + _vm.PlatformService.SetTaskbarProgress((ulong)CurrentIndex, (ulong)ImagePaths.Count); + }); + } - await AddAsync(index, preloadValue.ImageModel).ConfigureAwait(false); + await PreLoader.PreLoadAsync(CurrentIndex, ImagePaths.Count, IsReversed, ImagePaths) + .ConfigureAwait(false); + } - // Add recent files, except when browsing archive - if (string.IsNullOrWhiteSpace(TempFileHelper.TempFilePath) && ImagePaths.Count > index) - { - FileHistoryNavigation.Add(ImagePaths[index]); + await AddAsync(index, preloadValue.ImageModel).ConfigureAwait(false); + + // Add recent files, except when browsing archive + if (string.IsNullOrWhiteSpace(TempFileHelper.TempFilePath) && ImagePaths.Count > index) + { + FileHistoryNavigation.Add(ImagePaths[index]); + } } - } - catch (Exception e) - { + catch (Exception e) + { #if DEBUG - Console.WriteLine($"{nameof(IterateToIndex)} exception: \n{e.Message}"); - await TooltipHelper.ShowTooltipMessageAsync(e.Message); + Console.WriteLine($"{nameof(IterateToIndex)} exception: \n{e.Message}"); + await TooltipHelper.ShowTooltipMessageAsync(e.Message); #endif - } - finally - { - _vm.IsLoading = false; - } - - return; - - void TryShowPreview(PreLoader.PreLoadValue preloadValue) - { - if (preloadValue is null) - { - return; } - - if (!preloadValue.IsLoading) + finally { - return; + _vm.IsLoading = false; } - if (index != CurrentIndex) - { - return; - } + return; - if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide) - { - SetTitleHelper.SetLoadingTitle(_vm); - _vm.IsLoading = true; - _vm.ImageSource = null; - _vm.SecondaryImageSource = null; - } - else + void TryShowPreview(PreLoader.PreLoadValue preloadValue) { - UpdateImage.LoadingPreview(_vm, index); + if (preloadValue is null) + { + return; + } + + if (!preloadValue.IsLoading) + { + return; + } + + if (index != CurrentIndex) + { + return; + } + + if (SettingsHelper.Settings.ImageScaling.ShowImageSideBySide) + { + SetTitleHelper.SetLoadingTitle(_vm); + _vm.IsLoading = true; + _vm.ImageSource = null; + _vm.SecondaryImageSource = null; + } + else + { + UpdateImage.LoadingPreview(_vm, index); + } } - } + }); } private static Timer? _timer; diff --git a/src/PicView.Avalonia/Navigation/Preloader.cs b/src/PicView.Avalonia/Navigation/Preloader.cs index 2fdfdffa..d84f477a 100644 --- a/src/PicView.Avalonia/Navigation/Preloader.cs +++ b/src/PicView.Avalonia/Navigation/Preloader.cs @@ -294,7 +294,7 @@ public async Task PreLoadAsync(int currentIndex, int count, bool reverse, ListM192,96v64h248c4.4,0,8,3.6,8,8v240c0,4.4-3.6,8-8,8H136c-4.4,0-8-3.6-8-8v-48c0-4.4,3.6-8,8-8h248V224H192v64L64,192 L192,96z M488 352h-40V109.25l59.31-59.31c6.25-6.25 6.25-16.38 0-22.63L484.69 4.69c-6.25-6.25-16.38-6.25-22.63 0L402.75 64H192v96h114.75L160 306.75V24c0-13.26-10.75-24-24-24H88C74.75 0 64 10.74 64 24v40H24C10.75 64 0 74.74 0 88v48c0 13.25 10.75 24 24 24h40v264c0 13.25 10.75 24 24 24h232v-96H205.25L352 205.25V488c0 13.25 10.75 24 24 24h48c13.25 0 24-10.75 24-24v-40h40c13.25 0 24-10.75 24-24v-48c0-13.26-10.75-24-24-24z M512 1536h768v-384h-768v384zm896 0h128v-896q0-14-10-38.5t-20-34.5l-281-281q-10-10-34-20t-39-10v416q0 40-28 68t-68 28h-576q-40 0-68-28t-28-68v-416h-128v1280h128v-416q0-40 28-68t68-28h832q40 0 68 28t28 68v416zm-384-928v-320q0-13-9.5-22.5t-22.5-9.5h-192q-13 0-22.5 9.5t-9.5 22.5v320q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5-9.5t9.5-22.5zm640 32v928q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1344q0-40 28-68t68-28h928q40 0 88 20t76 48l280 280q28 28 48 76t20 88z + + + + + + + + + + + + + + + + + + @@ -40,7 +62,7 @@ + Thickness="2.5" /> @@ -48,7 +70,7 @@ + Thickness="2.5" /> @@ -56,7 +78,7 @@ + Thickness="2.5" /> @@ -64,7 +86,7 @@ + Thickness="2.5" /> @@ -72,7 +94,7 @@ + Thickness="2.5" /> #4F4F4F #d6d4d4 - #FF4B4B4B #22FFFFFF @@ -42,7 +41,10 @@ #EDEBEB #C4252525 + #FF303030 #FF3A3A3A + #FF2B2B2B + #2B251E #fff + #FFF2F2F2 #13FFFFFF + #FFF1F1F1 ? ResetSettingsCommand { get; } public ReactiveCommand? ShowSideBySideCommand { get; } - - public ReactiveCommand? ChangeThemeCommand { get; } #endregion Commands @@ -1842,8 +1840,6 @@ public MainViewModel(IPlatformSpecificService? platformSpecificService) SlideshowCommand = ReactiveCommand.CreateFromTask(StartSlideShowTask); ToggleTaskbarProgressCommand = ReactiveCommand.CreateFromTask(FunctionsHelper.ToggleTaskbarProgress); - - ChangeThemeCommand = ReactiveCommand.CreateFromTask(FunctionsHelper.ChangeTheme); #endregion UI Commands diff --git a/src/PicView.Avalonia/ViewModels/ViewModelBase.cs b/src/PicView.Avalonia/ViewModels/ViewModelBase.cs index 606d6e99..8d89e542 100644 --- a/src/PicView.Avalonia/ViewModels/ViewModelBase.cs +++ b/src/PicView.Avalonia/ViewModels/ViewModelBase.cs @@ -224,10 +224,19 @@ public void UpdateLanguage() SideBySideTooltip = TranslationHelper.Translation.SideBySideTooltip; HighlightColor = TranslationHelper.Translation.HighlightColor; AllowZoomOut = TranslationHelper.Translation.AllowZoomOut; + GlassTheme = TranslationHelper.Translation.GlassTheme; } #region Strings + private string? _glassTheme; + + public string? GlassTheme + { + get => _glassTheme; + set => this.RaiseAndSetIfChanged(ref _glassTheme, value); + } + private string? _allowZoomOut; public string? AllowZoomOut diff --git a/src/PicView.Avalonia/Views/AppearanceView.axaml b/src/PicView.Avalonia/Views/AppearanceView.axaml index f3cf3e68..660fac83 100644 --- a/src/PicView.Avalonia/Views/AppearanceView.axaml +++ b/src/PicView.Avalonia/Views/AppearanceView.axaml @@ -35,6 +35,7 @@ x:Name="ThemeBox"> + @@ -93,26 +94,25 @@ BorderThickness="0,1,0,0" CornerRadius="0,0,8,8" Height="{CompiledBinding BottombarHeight, - Mode=OneWay}"> + Mode=OneWay}" + x:Name="MainBottomBorder"> - + Width="56" + x:Name="FileMenuButton" /> - + x:Name="PreviousButton" /> - + x:Name="NextButton" /> - + Width="56" + x:Name="SettingsMenuButton" /> + + Loaded += delegate { - if (!Application.Current.TryGetResource("ButtonForegroundPointerOver", Application.Current.RequestedThemeVariant, out var buttonForegroundPointerOver)) + PointerPressed += (_, e) => MoveWindow(e); + PointerExited += (_, _) => { - return; - } - var brush = new SolidColorBrush((Color)(buttonForegroundPointerOver ?? Brushes.White)); - NextIcon.Fill = brush; - }; - NextButton.PointerExited += (s, e) => - { - if (!Application.Current.TryGetResource("MainTextColor", Application.Current.RequestedThemeVariant, out var MainTextColor)) + DragAndDropHelper.RemoveDragDropView(); + }; + + if (!SettingsHelper.Settings.Theme.GlassTheme) { return; } - var brush = new SolidColorBrush((Color)(MainTextColor ?? Brushes.White)); - NextIcon.Fill = brush; - }; - PreviousButton.PointerEntered += (s, e) => - { - if (!Application.Current.TryGetResource("ButtonForegroundPointerOver", Application.Current.RequestedThemeVariant, out var buttonForegroundPointerOver)) + + MainBottomBorder.Background = Brushes.Transparent; + MainBottomBorder.BorderThickness = new Thickness(0); + + FileMenuButton.Background = Brushes.Transparent; + FileMenuButton.BorderThickness = new Thickness(0); + + ImageMenuButton.Background = Brushes.Transparent; + ImageMenuButton.BorderThickness = new Thickness(0); + + ToolsMenuButton.Background = Brushes.Transparent; + ToolsMenuButton.BorderThickness = new Thickness(0); + + SettingsMenuButton.Background = Brushes.Transparent; + SettingsMenuButton.BorderThickness = new Thickness(0); + + NextButton.Background = new SolidColorBrush(Color.FromArgb(15, 255, 255, 255)); + NextButton.BorderThickness = new Thickness(0); + + PreviousButton.Background = new SolidColorBrush(Color.FromArgb(15, 255, 255, 255)); + PreviousButton.BorderThickness = new Thickness(0); + + if (!Application.Current.TryGetResource("SecondaryTextColor", + Application.Current.RequestedThemeVariant, out var textColor)) { return; } - var brush = new SolidColorBrush((Color)(buttonForegroundPointerOver ?? Brushes.White)); - PrevIcon.Fill = brush; - }; - PreviousButton.PointerExited += (s, e) => - { - if (!Application.Current.TryGetResource("MainTextColor", Application.Current.RequestedThemeVariant, out var MainTextColor)) + + if (textColor is not Color color) { return; } - var brush = new SolidColorBrush((Color)(MainTextColor ?? Brushes.White)); - PrevIcon.Fill = brush; - }; - PointerPressed += (_, e) => MoveWindow(e); - PointerExited += (_, _) => - { - DragAndDropHelper.RemoveDragDropView(); + + FileMenuButton.Foreground = new SolidColorBrush(color); + ImageMenuButton.Foreground = new SolidColorBrush(color); + ToolsMenuButton.Foreground = new SolidColorBrush(color); + SettingsMenuButton.Foreground = new SolidColorBrush(color); + + NextButton.Foreground = new SolidColorBrush(color); + PreviousButton.Foreground = new SolidColorBrush(color); + }; } diff --git a/src/PicView.Avalonia/Views/SettingsView.axaml b/src/PicView.Avalonia/Views/SettingsView.axaml index 1cd9eb0b..6b33ec39 100644 --- a/src/PicView.Avalonia/Views/SettingsView.axaml +++ b/src/PicView.Avalonia/Views/SettingsView.axaml @@ -986,6 +986,7 @@ BorderThickness="0,1,1,0" Classes="BorderStyle altHover mainBtn" Command="{CompiledBinding ResetSettingsCommand}" + CornerRadius="0,0,0,8" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Bottom" diff --git a/src/PicView.Avalonia/Views/UC/Buttons/StarOutlineButtons.axaml b/src/PicView.Avalonia/Views/UC/Buttons/StarOutlineButtons.axaml index 06af919c..ed71d660 100644 --- a/src/PicView.Avalonia/Views/UC/Buttons/StarOutlineButtons.axaml +++ b/src/PicView.Avalonia/Views/UC/Buttons/StarOutlineButtons.axaml @@ -5,6 +5,7 @@ x:Class="PicView.Avalonia.Views.UC.Buttons.StarOutlineButtons" x:DataType="viewModels:MainViewModel" xmlns="https://github.com/avaloniaui" + xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels" @@ -12,113 +13,77 @@ - - - - - - - - - - - - - - - - - - - - - - - + PointerExited="Stars_OnPointerExited" + x:Name="Star1" /> - + PointerExited="Stars_OnPointerExited" + x:Name="Star2" /> - + PointerExited="Stars_OnPointerExited" + x:Name="Star3" /> - + PointerExited="Stars_OnPointerExited" + x:Name="Star4" /> - + PointerExited="Stars_OnPointerExited" + x:Name="Star5" /> \ No newline at end of file diff --git a/src/PicView.Avalonia/Views/UC/Buttons/StarOutlineButtons.axaml.cs b/src/PicView.Avalonia/Views/UC/Buttons/StarOutlineButtons.axaml.cs index 7359636f..eb190516 100644 --- a/src/PicView.Avalonia/Views/UC/Buttons/StarOutlineButtons.axaml.cs +++ b/src/PicView.Avalonia/Views/UC/Buttons/StarOutlineButtons.axaml.cs @@ -1,8 +1,8 @@ +using Avalonia; using Avalonia.Controls; using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Media; -using Avalonia.Styling; using Avalonia.Threading; using PicView.Avalonia.ViewModels; @@ -67,106 +67,106 @@ public void SetStars(uint stars) public void FillStar1() { - if (!this.TryFindResource("StarFilledDrawingImage", ThemeVariant.Default, out var resourceValue1)) + if (!this.TryFindResource("StarFilledDrawingImage", Application.Current.RequestedThemeVariant, out var resourceValue1)) { return; } - if (!this.TryFindResource("StarOutlineDrawingImage", ThemeVariant.Default, out var resourceValue2)) + if (!this.TryFindResource("StarOutlineDrawingImage", Application.Current.RequestedThemeVariant, out var resourceValue2)) { return; } var filledStar = resourceValue1 as DrawingImage; - Star1.Source = filledStar; + Star1.Icon = filledStar; var outlinedStar = resourceValue2 as DrawingImage; - Star2.Source = outlinedStar; - Star3.Source = outlinedStar; - Star4.Source = outlinedStar; - Star5.Source = outlinedStar; + Star2.Icon = outlinedStar; + Star3.Icon = outlinedStar; + Star4.Icon = outlinedStar; + Star5.Icon = outlinedStar; } public void FillStar2() { - if (!this.TryFindResource("StarFilledDrawingImage", ThemeVariant.Default, out var resourceValue1)) + if (!this.TryFindResource("StarFilledDrawingImage", Application.Current.RequestedThemeVariant, out var resourceValue1)) { return; } - if (!this.TryFindResource("StarOutlineDrawingImage", ThemeVariant.Default, out var resourceValue2)) + if (!this.TryFindResource("StarOutlineDrawingImage", Application.Current.RequestedThemeVariant, out var resourceValue2)) { return; } var filledStar = resourceValue1 as DrawingImage; - Star1.Source = filledStar; - Star2.Source = filledStar; - Star3.Source = resourceValue2 as DrawingImage; - Star4.Source = resourceValue2 as DrawingImage; - Star5.Source = resourceValue2 as DrawingImage; + Star1.Icon = filledStar; + Star2.Icon = filledStar; + Star3.Icon = resourceValue2 as DrawingImage; + Star4.Icon = resourceValue2 as DrawingImage; + Star5.Icon = resourceValue2 as DrawingImage; } public void FillStar3() { - if (!this.TryFindResource("StarFilledDrawingImage", ThemeVariant.Default, out var resourceValue1)) + if (!this.TryFindResource("StarFilledDrawingImage", Application.Current.RequestedThemeVariant, out var resourceValue1)) { return; } - if (!this.TryFindResource("StarOutlineDrawingImage", ThemeVariant.Default, out var resourceValue2)) + if (!this.TryFindResource("StarOutlineDrawingImage", Application.Current.RequestedThemeVariant, out var resourceValue2)) { return; } var filledStar = resourceValue1 as DrawingImage; - Star1.Source = filledStar; - Star2.Source = filledStar; - Star3.Source = filledStar; - Star4.Source = resourceValue2 as DrawingImage; - Star5.Source = resourceValue2 as DrawingImage; + Star1.Icon = filledStar; + Star2.Icon = filledStar; + Star3.Icon = filledStar; + Star4.Icon = resourceValue2 as DrawingImage; + Star5.Icon = resourceValue2 as DrawingImage; } public void FillStar4() { - if (!this.TryFindResource("StarFilledDrawingImage", ThemeVariant.Default, out var resourceValue1)) + if (!this.TryFindResource("StarFilledDrawingImage", Application.Current.RequestedThemeVariant, out var resourceValue1)) { return; } - if (!this.TryFindResource("StarOutlineDrawingImage", ThemeVariant.Default, out var resourceValue2)) + if (!this.TryFindResource("StarOutlineDrawingImage", Application.Current.RequestedThemeVariant, out var resourceValue2)) { return; } var filledStar = resourceValue1 as DrawingImage; - Star1.Source = filledStar; - Star2.Source = filledStar; - Star3.Source = filledStar; - Star4.Source = filledStar; - Star5.Source = resourceValue2 as DrawingImage; + Star1.Icon = filledStar; + Star2.Icon = filledStar; + Star3.Icon = filledStar; + Star4.Icon = filledStar; + Star5.Icon = resourceValue2 as DrawingImage; } public void FillStar5() { - if (!this.TryFindResource("StarFilledDrawingImage", ThemeVariant.Default, out var resourceValue)) + if (!this.TryFindResource("StarFilledDrawingImage", Application.Current.RequestedThemeVariant, out var resourceValue)) { return; } var filledStar = resourceValue as DrawingImage; - Star1.Source = filledStar; - Star2.Source = filledStar; - Star3.Source = filledStar; - Star4.Source = filledStar; - Star5.Source = filledStar; + Star1.Icon = filledStar; + Star2.Icon = filledStar; + Star3.Icon = filledStar; + Star4.Icon = filledStar; + Star5.Icon = filledStar; } public void OutlineStars() { - if (!this.TryFindResource("StarOutlineDrawingImage", ThemeVariant.Default, out var resourceValue)) + if (!this.TryFindResource("StarOutlineDrawingImage", Application.Current.RequestedThemeVariant, out var resourceValue)) { return; } var drawingImage = resourceValue as DrawingImage; - Star1.Source = drawingImage; - Star2.Source = drawingImage; - Star3.Source = drawingImage; - Star4.Source = drawingImage; - Star5.Source = drawingImage; + Star1.Icon = drawingImage; + Star2.Icon = drawingImage; + Star3.Icon = drawingImage; + Star4.Icon = drawingImage; + Star5.Icon = drawingImage; } private void Star1_OnPointerEntered(object? sender, PointerEventArgs e) diff --git a/src/PicView.Avalonia/Views/UC/EditableTitlebar.axaml b/src/PicView.Avalonia/Views/UC/EditableTitlebar.axaml index 5565c783..e87881ca 100644 --- a/src/PicView.Avalonia/Views/UC/EditableTitlebar.axaml +++ b/src/PicView.Avalonia/Views/UC/EditableTitlebar.axaml @@ -18,7 +18,6 @@ FontFamily="avares://PicView.Avalonia/Assets/Fonts/Roboto-Medium.ttf#Roboto" FontSize="13" FontWeight="Medium" - Foreground="{DynamicResource MainTextColor}" Height="{CompiledBinding TitlebarHeight, Mode=OneWay}" IsTabStop="False" @@ -39,7 +38,6 @@ FontFamily="avares://PicView.Avalonia/Assets/Fonts/Roboto-Medium.ttf#Roboto" FontSize="13" FontWeight="Medium" - Foreground="{DynamicResource MainTextColor}" Height="{CompiledBinding TitlebarHeight, Mode=OneWay}" IsTabStop="False" diff --git a/src/PicView.Core/Config/AppSettings.cs b/src/PicView.Core/Config/AppSettings.cs index e66bba69..da73c7cc 100644 --- a/src/PicView.Core/Config/AppSettings.cs +++ b/src/PicView.Core/Config/AppSettings.cs @@ -2,7 +2,7 @@ public class AppSettings { - public double Version { get; set; } = 1; + public double Version { get; set; } = 1.1; public WindowProperties? WindowProperties { get; set; } public UIProperties? UIProperties { get; set; } public Theme? Theme { get; set; } @@ -45,6 +45,9 @@ public class Theme { public bool Dark { get; set; } = true; public int ColorTheme { get; set; } = 3; + public bool UseSystemTheme { get; set; } = false; + + public bool GlassTheme { get; set; } = false; } public class Gallery diff --git a/src/PicView.Core/Config/Languages/da.json b/src/PicView.Core/Config/Languages/da.json index eb8ce1ac..b1643038 100644 --- a/src/PicView.Core/Config/Languages/da.json +++ b/src/PicView.Core/Config/Languages/da.json @@ -10,7 +10,6 @@ "AllowZoomOut": "Undgå at zoome ud på billedet, når det allerede er i maksimal størrelse", "Alt": "Alt", "Altitude": "Højde", - "AnErrorOccuredWhenDeleting": "Der skete en fejl ved sletning", "AperturePriority": "Blænde prioritet", "Appearance": "Udseende", "ApplicationShortcuts": "Genveje til programmet", @@ -152,6 +151,7 @@ "GeneralSettings": "Generale Indstillinger", "GenerateThumbnails": "Generer thumbnails", "GithubRepo": "Github side", + "GlassTheme": "Glas tema", "GlassTile": "Glasflise", "Gloom": "Gloom", "GoToImageAtSpecifiedIndex": "Indlæs billede ved bestemt numerisk placering", diff --git a/src/PicView.Core/Config/Languages/de.json b/src/PicView.Core/Config/Languages/de.json index 692fef70..a6b39512 100644 --- a/src/PicView.Core/Config/Languages/de.json +++ b/src/PicView.Core/Config/Languages/de.json @@ -10,7 +10,6 @@ "AllowZoomOut": "Vermeide das Herauszoomen des Bildes, wenn es bereits maximale Größe hat", "Alt": "Alt", "Altitude": "Höhe", - "AnErrorOccuredWhenDeleting": "Es ist ein Fehler beim Löschen aufgetreten", "AperturePriority": "Blendenpriorität", "Appearance": "Erscheinungsbild", "ApplicationShortcuts": "Anwendungs-Tastenkürzel", @@ -152,6 +151,7 @@ "GeneralSettings": "Allgemeine Einstellungen", "GenerateThumbnails": "Miniaturbilder generieren", "GithubRepo": "Github repository", + "GlassTheme": "Glas Thema", "GlassTile": "Glassplitter", "Gloom": "Dunkelheit", "GoToImageAtSpecifiedIndex": "Gehe zum Bild mit dem spezifiziertem Index", diff --git a/src/PicView.Core/Config/Languages/en.json b/src/PicView.Core/Config/Languages/en.json index 74cef173..9ce839ad 100644 --- a/src/PicView.Core/Config/Languages/en.json +++ b/src/PicView.Core/Config/Languages/en.json @@ -10,7 +10,6 @@ "AllowZoomOut": "Avoid zooming out the image when it is already at the maximum size", "Alt": "Alt", "Altitude": "Altitude", - "AnErrorOccuredWhenDeleting": "An error occured when deleting", "AperturePriority": "Aperture priority", "Appearance": "Appearance", "ApplicationShortcuts": "Application Shortcuts", @@ -152,6 +151,7 @@ "GeneralSettings": "General Settings", "GenerateThumbnails": "Generate thumbnails", "GithubRepo": "Github repository", + "GlassTheme": "Glass Theme", "GlassTile": "Glass Tile", "Gloom": "Gloom", "GoToImageAtSpecifiedIndex": "Go to image at specified index", diff --git a/src/PicView.Core/Config/Languages/es.json b/src/PicView.Core/Config/Languages/es.json index 9766692f..6f4406cb 100644 --- a/src/PicView.Core/Config/Languages/es.json +++ b/src/PicView.Core/Config/Languages/es.json @@ -10,7 +10,6 @@ "AllowZoomOut": "Evite hacer zoom out en la imagen cuando ya esté en tamaño máximo", "Alt": "Alt", "Altitude": "Altitud", - "AnErrorOccuredWhenDeleting": "Ha ocurrido un error al eliminar", "AperturePriority": "Prioridad de apertura", "Appearance": "Opciones de interfaz", "ApplicationShortcuts": "Atajos de la aplicación", @@ -152,6 +151,7 @@ "GeneralSettings": "Opciones Generales", "GenerateThumbnails": "Generar miniaturas", "GithubRepo": "Repositorio de Github", + "GlassTheme": "Tema de vidrio", "GlassTile": "Cubos de Cristal", "Gloom": "Oscuridad", "GoToImageAtSpecifiedIndex": "Ir a imagen en índice especificado", diff --git a/src/PicView.Core/Config/Languages/fr.json b/src/PicView.Core/Config/Languages/fr.json index 0aff8a06..bd61b1b4 100644 --- a/src/PicView.Core/Config/Languages/fr.json +++ b/src/PicView.Core/Config/Languages/fr.json @@ -10,7 +10,6 @@ "AllowZoomOut": "Évitez de zoomer sur l'image lorsqu'elle est déjà à sa taille maximale", "Alt": "Alt", "Altitude": "Altitude", - "AnErrorOccuredWhenDeleting": "Une erreur s'est produite lors de la suppression", "AperturePriority": "Priorité à l'ouverture", "Appearance": "Apparence", "ApplicationShortcuts": "Raccourcis d'application", @@ -152,6 +151,7 @@ "GeneralSettings": "Paramètres généraux", "GenerateThumbnails": "Générer des miniatures", "GithubRepo": "Référentiel GitHub", + "GlassTheme": "Thème en verre", "GlassTile": "Tuile en verre", "Gloom": "Sombre", "GoToImageAtSpecifiedIndex": "Aller à l'image à l'index spécifié", diff --git a/src/PicView.Core/Config/Languages/it.json b/src/PicView.Core/Config/Languages/it.json index 68ea511d..538d2cf0 100644 --- a/src/PicView.Core/Config/Languages/it.json +++ b/src/PicView.Core/Config/Languages/it.json @@ -10,7 +10,6 @@ "AllowZoomOut": "Evitare lo zoom dell'immagine quando è già alla dimensione massima", "Alt": "Alt", "Altitude": "Altitudine", - "AnErrorOccuredWhenDeleting": "Si è verificato un errore durante il cancellamento", "AperturePriority": "Priorità di apertura", "Appearance": "Aspetto", "ApplicationShortcuts": "Scorciatoie per le applicazioni", @@ -152,6 +151,7 @@ "GeneralSettings": "Impostazioni generali", "GenerateThumbnails": "Genera le miniature", "GithubRepo": "Repository Github", + "GlassTheme": "Tema di vetro", "GlassTile": "Piastrella di vetro", "Gloom": "BuioGloom", "GoToImageAtSpecifiedIndex": "Vai all'immagine all'indice specificato", diff --git a/src/PicView.Core/Config/Languages/ko.json b/src/PicView.Core/Config/Languages/ko.json index 6b5273e5..32a0b838 100644 --- a/src/PicView.Core/Config/Languages/ko.json +++ b/src/PicView.Core/Config/Languages/ko.json @@ -10,7 +10,6 @@ "AllowZoomOut": "이미지가 이미 최대 크기일 때는 축소하지 않음", "Alt": "Alt", "Altitude": "고도", - "AnErrorOccuredWhenDeleting": "삭제할 때 오류 발생", "AperturePriority": "조리개 우선", "Appearance": "외관", "ApplicationShortcuts": "응용 프로그램 단축키", @@ -152,6 +151,7 @@ "GeneralSettings": "일반 설정", "GenerateThumbnails": "썸네일 생성", "GithubRepo": "Github 저장소", + "GlassTheme": "유리 테마", "GlassTile": "유리 타일", "Gloom": "우울", "GoToImageAtSpecifiedIndex": "지정된 인덱스에서 이미지로 이동", diff --git a/src/PicView.Core/Config/Languages/pl.json b/src/PicView.Core/Config/Languages/pl.json index b097197e..c035f2d4 100644 --- a/src/PicView.Core/Config/Languages/pl.json +++ b/src/PicView.Core/Config/Languages/pl.json @@ -10,7 +10,6 @@ "AllowZoomOut": "Unikaj zmniejszania obrazu: gdy jest już w maksymalnym rozmiarze", "Alt": "Alt", "Altitude": "Wysokość", - "AnErrorOccuredWhenDeleting": "Wystąpił błąd podczas usuwania", "AperturePriority": "Priorytet przysłony", "Appearance": "Wygląd", "ApplicationShortcuts": "Skróty aplikacji", @@ -152,6 +151,7 @@ "GeneralSettings": "Ustawienia ogólne", "GenerateThumbnails": "Generuj miniatury", "GithubRepo": "Repozytorium na Github", + "GlassTheme": "Motyw szklany", "GlassTile": "Szklane kafelki", "Gloom": "Przyciemniony", "GoToImageAtSpecifiedIndex": "Przejdź do zdjęcia o określonym indeksie", diff --git a/src/PicView.Core/Config/Languages/ro.json b/src/PicView.Core/Config/Languages/ro.json index 8d8af8fe..29668cb1 100644 --- a/src/PicView.Core/Config/Languages/ro.json +++ b/src/PicView.Core/Config/Languages/ro.json @@ -10,7 +10,6 @@ "AllowZoomOut": "Evitați micșorarea imaginii când aceasta este deja la dimensiunea maximă", "Alt": "Alt", "Altitude": "Altitudine", - "AnErrorOccuredWhenDeleting": "A apărut o eroare în timpul ștergerii", "AperturePriority": "Prioritate diafragmă", "Appearance": "Aspect", "ApplicationShortcuts": "Comenzi rapide ale aplicației", @@ -152,6 +151,7 @@ "GeneralSettings": "Setări generale", "GenerateThumbnails": "Generare miniaturi", "GithubRepo": "Depozit GitHub", + "GlassTheme": "Temă de sticlă", "GlassTile": "Dale din sticlă", "Gloom": "Întunecare", "GoToImageAtSpecifiedIndex": "Mergi la imagine la indexul specificat", diff --git a/src/PicView.Core/Config/Languages/ru.json b/src/PicView.Core/Config/Languages/ru.json index e3839998..93a82cd7 100644 --- a/src/PicView.Core/Config/Languages/ru.json +++ b/src/PicView.Core/Config/Languages/ru.json @@ -10,7 +10,6 @@ "AllowZoomOut": "Избегайте уменьшения изображения, когда оно уже находится в максимальном размере", "Alt": "Alt", "Altitude": "Высота", - "AnErrorOccuredWhenDeleting": "Произошла ошибка при удалении", "AperturePriority": "Приоритет диафрагмы", "Appearance": "Внешний вид", "ApplicationShortcuts": "Сочетания клавиш приложения", @@ -152,6 +151,7 @@ "GeneralSettings": "Общие настройки", "GenerateThumbnails": "Генерировать миниатюры", "GithubRepo": "Репозиторий Github", + "GlassTheme": "Стеклянная тема", "GlassTile": "Стеклянная плитка", "Gloom": "Мрак", "GoToImageAtSpecifiedIndex": "Перейти к изображению по указанному индексу", diff --git a/src/PicView.Core/Config/Languages/zh-CN.json b/src/PicView.Core/Config/Languages/zh-CN.json index 7d77ba67..7240f2ce 100644 --- a/src/PicView.Core/Config/Languages/zh-CN.json +++ b/src/PicView.Core/Config/Languages/zh-CN.json @@ -10,7 +10,6 @@ "AllowZoomOut": "在最大尺寸时避免缩小图像", "Alt": "Alt", "Altitude": "海拔", - "AnErrorOccuredWhenDeleting": "删除时发生错误", "AperturePriority": "光圈优先", "Appearance": "外观", "ApplicationShortcuts": "应用程序快捷键", @@ -152,6 +151,7 @@ "GeneralSettings": "常规设置", "GenerateThumbnails": "生成缩略图", "GithubRepo": "Github 仓库", + "GlassTheme": "玻璃主题", "GlassTile": "平铺瓷砖", "Gloom": "暗淡", "GoToImageAtSpecifiedIndex": "跳转至指定图片", diff --git a/src/PicView.Core/Config/Languages/zh-TW.json b/src/PicView.Core/Config/Languages/zh-TW.json index a0d98991..b54e7047 100644 --- a/src/PicView.Core/Config/Languages/zh-TW.json +++ b/src/PicView.Core/Config/Languages/zh-TW.json @@ -10,7 +10,6 @@ "AllowZoomOut": "在圖片已達最大尺寸時,不要縮小圖片", "Alt": "Alt", "Altitude": "海拔", - "AnErrorOccuredWhenDeleting": "刪除時發生錯誤", "AperturePriority": "光圈優先", "Appearance": "介面設定", "ApplicationShortcuts": "應用程式快捷鍵", @@ -152,6 +151,7 @@ "GeneralSettings": "常規設定", "GenerateThumbnails": "生成縮圖", "GithubRepo": "Github", + "GlassTheme": "玻璃主題", "GlassTile": "毛玻璃", "Gloom": "暗淡", "GoToImageAtSpecifiedIndex": "跳轉至指定圖片", diff --git a/src/PicView.Core/Localization/LanguageModel.cs b/src/PicView.Core/Localization/LanguageModel.cs index d24dcc64..088186c4 100644 --- a/src/PicView.Core/Localization/LanguageModel.cs +++ b/src/PicView.Core/Localization/LanguageModel.cs @@ -387,4 +387,5 @@ public class LanguageModel public string? BottomGalleryThumbnailStretch { get; set; } public string? SideBySide { get; set; } public string? SideBySideTooltip { get; set; } + public string? GlassTheme { get; set; } } \ No newline at end of file