Pārlūkot izejas kodu

Animated gif support, more compact UI, misc

Ruben 4 gadi atpakaļ
vecāks
revīzija
c6177bcc46

+ 3 - 0
.editorconfig

@@ -8,3 +8,6 @@ dotnet_code_quality_unused_parameters = all:suggestion
 
 # IDE0008: Use explicit type
 csharp_style_var_elsewhere = true
+
+# Default severity for analyzer diagnostics with category 'Style'
+dotnet_analyzer_diagnostic.category-Style.severity = none

+ 0 - 118
PicView/ChangeImage/Error_Handling.cs

@@ -19,124 +19,6 @@ namespace PicView.ChangeImage
 {
     internal static class Error_Handling
     {
-        /// <summary>
-        /// Attemps to fix erros and prevent crashes
-        /// </summary>
-        /// <param name="x">The index to start from</param>
-        internal static async Task<Preloader.PreloadValue> PicErrorFix(int x)
-        {
-            Preloader.PreloadValue pic;
-#if DEBUG
-            Trace.WriteLine("Entered PicErrorFix");
-#endif
-            if (Pics == null)
-            {
-                Reload(true);
-                return null;
-            }
-
-            if (x == -1)
-            {
-                await GetValues(Pics[0]).ConfigureAwait(true);
-            }
-
-            if (Pics.Count < 0)
-            {
-                ShowTooltipMessage(Application.Current.Resources["UnexpectedError"], true, TimeSpan.FromSeconds(3));
-                Unload();
-                return null;
-            }
-            else if (x >= Pics.Count)
-            {
-                if (Pics.Count > 0)
-                {
-                    if (x < Pics.Count)
-                    {
-                        pic = new Preloader.PreloadValue(await RenderToBitmapSource(Pics[x]).ConfigureAwait(true), false);
-                        if (pic != null)
-                        {
-                            return pic;
-                        }
-                    }
-                }
-                else
-                {
-                    Unload();
-                    return null;
-                }
-            }
-            else if (x < 0)
-            {
-                pic = new Preloader.PreloadValue(await RenderToBitmapSource(Pics[x]).ConfigureAwait(true), false);
-                if (pic != null)
-                {
-                    return pic;
-                }
-                else
-                {
-                    Pics = FileList(Path.GetDirectoryName(Pics[x]));
-                    Pics.Remove(Pics[x]);
-                    x--;
-
-                    if (x < 0)
-                    {
-                        Unload();
-                        return null;
-                    }
-                }
-            }
-
-            var file = Pics[x];
-
-            if (file == null)
-            {
-                ShowTooltipMessage(Application.Current.Resources["UnexpectedError"], true, TimeSpan.FromSeconds(3));
-                Unload();
-                return null;
-            }
-
-            // Retry if exists, fixes rare error
-            if (File.Exists(file))
-            {
-                pic = new Preloader.PreloadValue(await RenderToBitmapSource(file).ConfigureAwait(true), false);
-                if (pic != null)
-                {
-                    return pic;
-                }
-
-                return null;
-            }
-
-            // Continue to remove file if can't be rendered
-            Pics.Remove(file);
-
-            // Check if there's still images in folder
-            if (Pics.Count < 0)
-            {
-                ShowTooltipMessage(Application.Current.Resources["No images"], true, TimeSpan.FromSeconds(3));
-                Unload();
-
-                return null;
-            }
-
-            // Go to next image
-            if (Properties.Settings.Default.Looping)
-            {
-                x = x == Pics.Count - 1 ? 0 : FolderIndex;
-            }
-            else
-            {
-                x = x == Pics.Count - 1 ? Pics.Count - 2 : FolderIndex;
-            }
-
-            // Repeat process if the next image was not found
-            if (x > 0 && x < Pics.Count)
-            {
-                await PicErrorFix(x).ConfigureAwait(false);
-            }
-
-            return null;
-        }
 
         /// <summary>
         /// Clears data, to free objects no longer necessary to store in memory and allow changing folder without error.

+ 12 - 10
PicView/ChangeImage/Navigation.cs

@@ -160,14 +160,8 @@ namespace PicView.ChangeImage
             // Error checking to fix rare cases of crashing
             if (Pics.Count < index)
             {
-                preloadValue = await PicErrorFix(index).ConfigureAwait(true);
-                if (preloadValue == null)
-                {
-                    /// Try to recover
-                    /// TODO needs testing
-                    Reload(true);
-                    return;
-                }
+                Reload(false);
+                return;
             }
 
             FolderIndex = index;
@@ -209,7 +203,7 @@ namespace PicView.ChangeImage
                 while (preloadValue.isLoading)
                 {
                     // Wait for finnished result
-                    await Task.Delay(3).ConfigureAwait(true);
+                    await Task.Delay(5).ConfigureAwait(true);
                 }
             }
 
@@ -238,7 +232,15 @@ namespace PicView.ChangeImage
                     ConfigureWindows.GetMainWindow.MainImage.LayoutTransform = null;
                 }
 
-                ConfigureWindows.GetMainWindow.MainImage.Source = preloadValue.bitmapSource;
+                if (Path.GetExtension(Pics[index]).Equals(".gif", StringComparison.OrdinalIgnoreCase))
+                {
+                    XamlAnimatedGif.AnimationBehavior.SetSourceUri(ConfigureWindows.GetMainWindow.MainImage, new Uri(Pics[index]));
+                }
+                else
+                {
+                    ConfigureWindows.GetMainWindow.MainImage.Source = preloadValue.bitmapSource;
+                }
+                
                 FitImage(preloadValue.bitmapSource.PixelWidth, preloadValue.bitmapSource.PixelHeight);
                 SetTitleString(preloadValue.bitmapSource.PixelWidth, preloadValue.bitmapSource.PixelHeight, index);
             }));

+ 3 - 3
PicView/ImageHandling/ImageDecoder.cs

@@ -38,7 +38,6 @@ namespace PicView.ImageHandling
                     case ".BMP":
                     case ".TIF":
                     case ".TIFF":
-                    case ".GIF":
                     case ".ICO":
                     case ".JFIF":
                     case ".WEBP":
@@ -56,6 +55,7 @@ namespace PicView.ImageHandling
                         skPic.Freeze();
                         sKBitmap.Dispose();
                         return skPic;
+                    // ".GIF": empty since XamlAnimatedGif dynamically loads it
 
                     case ".DDS":
                     case "TGA": // TODO some tga files are created upside down https://github.com/Ruben2776/PicView/issues/22
@@ -128,7 +128,7 @@ namespace PicView.ImageHandling
         {
             BitmapSource pic;
 
-            using MagickImage magick = new MagickImage
+            using MagickImage magick = new()
             {
                 Quality = 100
             };
@@ -239,7 +239,7 @@ namespace PicView.ImageHandling
 
                 ctx.DrawText(text, new Point(rect.Left + rect.Width / 2, rect.Top + rect.Height / 2));
             }
-            RenderTargetBitmap rtv = new RenderTargetBitmap((int)w, (int)h, 96.0, 96.0, PixelFormats.Default);
+            RenderTargetBitmap rtv = new((int)w, (int)h, 96.0, 96.0, PixelFormats.Default);
             rtv.Render(visual);
             rtv.Freeze();
             return rtv;

+ 10 - 11
PicView/PicView.csproj

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Sdk="Microsoft.NET.Sdk.WindowsDesktop">
+<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -42,23 +42,21 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DocumentationFile>
-    </DocumentationFile>
+    <DocumentationFile></DocumentationFile>
     <LangVersion>7.0</LangVersion>
     <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <PlatformTarget>x64</PlatformTarget>
     <DebugType>none</DebugType>
-    <Optimize>False</Optimize>
+    <Optimize>true</Optimize>
     <OutputPath>bin\Release\</OutputPath>
     <DefineConstants>
     </DefineConstants>
     <ErrorReport>none</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <LangVersion>7.0</LangVersion>
-    <DocumentationFile>
-    </DocumentationFile>
+    <DocumentationFile></DocumentationFile>
     <FileAlignment>1024</FileAlignment>
     <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
   </PropertyGroup>
@@ -259,17 +257,18 @@
     <Resource Include="Themes\Resources\img\noisy-texture-200x200-o4-d31-c-161616-t0.png" />
   </ItemGroup>
   <ItemGroup>
-    <PackageReference Include="Magick.NET-Q16-x64" Version="7.24.1" />
-    <PackageReference Include="Magick.NET.SystemDrawing" Version="2.0.17" />
-    <PackageReference Include="Magick.NET.SystemWindowsMedia" Version="3.0.11" />
+    <PackageReference Include="Magick.NET-Q16-x64" Version="8.2.1" />
+    <PackageReference Include="Magick.NET.SystemDrawing" Version="4.0.4" />
+    <PackageReference Include="Magick.NET.SystemWindowsMedia" Version="4.0.4" />
     <PackageReference Include="Microsoft-WindowsAPICodePack-Core" Version="1.1.4" />
     <PackageReference Include="Microsoft-WindowsAPICodePack-Shell" Version="1.1.4" />
     <PackageReference Include="Microsoft-WindowsAPICodePack-ShellExtensions" Version="1.1.4" />
-    <PackageReference Include="Pfim" Version="0.10.0" />
+    <PackageReference Include="Pfim" Version="0.10.1" />
     <PackageReference Include="SkiaSharp" Version="2.80.2" />
-    <PackageReference Include="SkiaSharp.Views.WPF" Version="2.80.2" />
+    <PackageReference Include="SkiaSharp.Views.WPF" Version="2.80.1" />
     <PackageReference Include="System.Runtime.WindowsRuntime" Version="5.0.0-preview.5.20278.1" />
     <PackageReference Include="System.Runtime.WindowsRuntime.UI.Xaml" Version="5.0.0-preview.5.20278.1" />
+    <PackageReference Include="XamlAnimatedGif" Version="2.0.1" />
   </ItemGroup>
   <ItemGroup>
     <Compile Update="Properties\Settings.Designer.cs">

+ 5 - 7
PicView/SystemIntegration/Lockscreen.cs

@@ -4,8 +4,6 @@ using System.IO;
 using System.Threading.Tasks;
 using System.Timers;
 using System.Windows;
-//using Windows.Storage;
-//using Windows.System.UserProfile;
 
 namespace PicView.SystemIntegration
 {
@@ -13,10 +11,6 @@ namespace PicView.SystemIntegration
     {
         internal static async Task ChangeLockScreenBackground(string path)
         {
-            //if (!UserProfilePersonalizationSettings.IsSupported())
-            //{
-            //    return;
-            //}
 
             if (UILogic.ConfigureWindows.GetMainWindow.MainImage.Effect != null || Clipboard.ContainsImage())
             {
@@ -48,7 +42,7 @@ namespace PicView.SystemIntegration
                         timer.Elapsed += (s, x) => Directory.Delete(tempPath);
                     }).ConfigureAwait(true);
 
-                    SaveImage.Dispose(); // Make visual studio happy
+                    SaveImage.Dispose();
                 }
                 catch (Exception e)
                 {
@@ -63,6 +57,10 @@ namespace PicView.SystemIntegration
 
         private static async Task Apply(string path)
         {
+            // Windows SDK Contracts error:
+            // SupportedOSPlatformVersion 10.0.19041.0 cannot be higher than TargetPlatformVersion 7.0.
+            // TODO find new lock screen saving method
+
             //try
             //{
             //    var storageFile = await StorageFile.GetFileFromPathAsync(path);

+ 1 - 1
PicView/UILogic/Loading/LoadContextMenus.cs

@@ -319,7 +319,7 @@ namespace PicView.UILogic.Loading
             };
             settingscmScrollHeader.Click += ConfigureSettings.UpdateUIValues.SetScrolling;
             settingscmScroll.Header = settingscmScrollHeader;
-            settingscmScroll.Click += (s, x) => { ConfigureSettings.UpdateUIValues.SetScrolling(s, x); settingscmScrollHeader.IsChecked = (bool)settingscmScrollHeader.IsChecked ? false : true; };
+            settingscmScroll.Click += (s, x) => { ConfigureSettings.UpdateUIValues.SetScrolling(s, x); settingscmScrollHeader.IsChecked = !(bool)settingscmScrollHeader.IsChecked; };
             settingscm.Items.Add(settingscmScroll);
 
             ///////////////////////////

+ 1 - 1
PicView/UILogic/Sizing/ScaleImage.cs

@@ -195,7 +195,7 @@ namespace PicView.UILogic.Sizing
             if (GetMainWindow.WindowState == System.Windows.WindowState.Normal)
             {
                 /// Update TitleBar
-                var interfaceSize = 205 * MonitorInfo.DpiScaling; // logo and buttons width
+                var interfaceSize = 192 * MonitorInfo.DpiScaling; // logo and buttons width
 
                 if (Properties.Settings.Default.FullscreenGallery)
                 {

+ 0 - 5
PicView/Views/UserControls/Buttons/CloseButton.xaml

@@ -4,11 +4,6 @@
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <Button
         x:Name="TheButton"
-        Width="35"
-        Height="35"
-        VerticalAlignment="Center"
-        BorderThickness="0"
-        DockPanel.Dock="Right"
         FocusVisualStyle="{x:Null}"
         Focusable="False">
         <Button.Background>

+ 0 - 5
PicView/Views/UserControls/Buttons/FullscreenButton.xaml

@@ -4,11 +4,6 @@
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <Button
         x:Name="TheButton"
-        Width="35"
-        Height="35"
-        VerticalAlignment="Center"
-        BorderThickness="0"
-        DockPanel.Dock="Right"
         FocusVisualStyle="{x:Null}"
         Focusable="False">
         <Button.Background>

+ 1 - 1
PicView/Views/UserControls/Buttons/LefttButton.xaml

@@ -5,7 +5,7 @@
     <Button
         x:Name="TheButton"
         Width="90"
-        Height="35"
+        Height="30"
         FocusVisualStyle="{x:Null}"
         Focusable="False">
         <Button.Background>

+ 0 - 2
PicView/Views/UserControls/Buttons/MinButton.xaml

@@ -4,8 +4,6 @@
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <Button
         x:Name="TheButton"
-        Width="35"
-        Height="35"
         FocusVisualStyle="{x:Null}"
         Focusable="False">
         <Button.Background>

+ 1 - 1
PicView/Views/UserControls/Buttons/RightButton.xaml

@@ -5,7 +5,7 @@
     <Button
         x:Name="TheButton"
         Width="90"
-        Height="35"
+        Height="30"
         FocusVisualStyle="{x:Null}"
         Focusable="False">
         <Button.Background>

+ 1 - 1
PicView/Views/UserControls/Misc/CustomTextBox.xaml

@@ -12,7 +12,7 @@
         CaretBrush="{StaticResource MainColorBrush}"
         ContextMenu="{x:Null}"
         FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Bold"
-        FontSize="14"
+        FontSize="12"
         Foreground="{StaticResource MainColorBrush}"
         OverridesDefaultStyle="True"
         SelectionBrush="{DynamicResource ChosenColorBrush}"

+ 1 - 1
PicView/Views/UserControls/Misc/Logo.xaml

@@ -2,7 +2,7 @@
     x:Class="PicView.Views.UserControls.Logo"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    Margin="7,0,0,0">
+    Margin="7,-3,0,0">
     <Canvas
         x:Name="Logobg"
         Width="81.7220001220703"

+ 2 - 2
PicView/Views/Windows/EffectsWindows.xaml

@@ -19,11 +19,11 @@
     <DockPanel LastChildFill="True">
         <Grid
             x:Name="TitleBar"
-            Height="35"
+            Height="30"
             Background="{StaticResource WindowBackgroundColorBrush}"
             DockPanel.Dock="Top">
 
-            <uc:Logo HorizontalAlignment="Left" />
+            <uc:Logo Margin="7,-3,0,0" HorizontalAlignment="Left" />
 
             <uc:MinButton
                 x:Name="MinButton"

+ 2 - 2
PicView/Views/Windows/FileAssociationsWindow.xaml

@@ -94,11 +94,11 @@
         <DockPanel>
             <Grid
                 x:Name="TitleBar"
-                Height="35"
+                Height="30"
                 Background="{StaticResource WindowBackgroundColorBrush}"
                 DockPanel.Dock="Top">
 
-                <uc:Logo HorizontalAlignment="Left" />
+                <uc:Logo Margin="7,-3,0,0" HorizontalAlignment="Left" />
 
                 <uc:CloseButton
                     x:Name="CloseButton"

+ 18 - 14
PicView/Views/Windows/ImageInfoWindow.xaml

@@ -19,21 +19,21 @@
     <DockPanel>
         <DockPanel
             x:Name="TitleBar"
-            Height="33"
+            Height="30"
             Background="{StaticResource WindowBackgroundColorBrush}"
             DockPanel.Dock="Top">
 
-            <uc:Logo />
+            <uc:Logo Margin="2,-2,0,0" />
 
             <Rectangle
                 Width="1"
-                Height="35"
+                Height="30"
                 Margin="8,0,0,0"
                 Fill="{StaticResource BorderBrush}" />
 
             <Button
                 x:Name="FileProperties"
-                Height="34"
+                Height="30"
                 Padding="15,1,15,1"
                 Content="{StaticResource FileProperties}"
                 Style="{StaticResource MetroFlatButton}">
@@ -47,12 +47,12 @@
 
             <Rectangle
                 Width="1"
-                Height="35"
+                Height="30"
                 Fill="{StaticResource BorderBrush}" />
 
             <Button
                 x:Name="Print"
-                Height="34"
+                Height="30"
                 Padding="15,1,15,1"
                 Content="{StaticResource Print}"
                 Style="{StaticResource MetroFlatButton}">
@@ -66,12 +66,12 @@
 
             <Rectangle
                 Width="1"
-                Height="35"
+                Height="30"
                 Fill="{StaticResource BorderBrush}" />
 
             <Button
                 x:Name="OpenWith"
-                Height="34"
+                Height="30"
                 Padding="15,1,15,1"
                 Content="{StaticResource OpenWith}"
                 Style="{StaticResource MetroFlatButton}">
@@ -85,12 +85,12 @@
 
             <Rectangle
                 Width="1"
-                Height="35"
+                Height="30"
                 Fill="{StaticResource BorderBrush}" />
 
             <Button
                 x:Name="ShowInFoler"
-                Height="34"
+                Height="30"
                 Padding="15,1,15,1"
                 Content="{StaticResource ShowInFolder}"
                 Style="{StaticResource MetroFlatButton}">
@@ -104,34 +104,38 @@
 
             <Rectangle
                 Width="1"
-                Height="35"
+                Height="30"
                 Fill="{StaticResource BorderBrush}" />
 
             <uc:CloseButton
                 x:Name="CloseButton"
+                Width="30"
+                Height="30"
                 VerticalAlignment="Center"
                 DockPanel.Dock="Right" />
 
             <Rectangle
                 Width="1"
-                Height="35"
+                Height="30"
                 DockPanel.Dock="Right"
                 Fill="{StaticResource BorderBrush}" />
 
             <uc:MinButton
                 x:Name="MinButton"
+                Width="30"
+                Height="30"
                 VerticalAlignment="Center"
                 DockPanel.Dock="Right" />
 
             <Rectangle
                 Width="1"
-                Height="35"
+                Height="30"
                 DockPanel.Dock="Right"
                 Fill="{StaticResource BorderBrush}" />
 
             <TextBlock
                 x:Name="Bar"
-                Height="35"
+                Height="30"
                 Padding="0,8.4,0,0"
                 VerticalAlignment="Center"
                 d:Text="Image Info"

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 135 - 131
PicView/Views/Windows/InfoWindow.xaml


+ 32 - 24
PicView/Views/Windows/MainWindow.xaml

@@ -19,46 +19,54 @@
     <DockPanel LastChildFill="True">
         <DockPanel
             x:Name="TitleBar"
-            Height="35"
+            Height="30"
             MinWidth="444"
             Background="{StaticResource WindowBackgroundColorBrush}"
             DockPanel.Dock="Top">
 
-            <uc:Logo />
+            <uc:Logo Margin="7,-3,0,0" />
 
             <Rectangle
                 Width="1"
-                Height="35"
+                Height="30"
                 Margin="8,0,0,0"
                 Fill="{StaticResource BorderBrush}" />
 
             <uc:CloseButton
                 x:Name="CloseButton"
+                Width="30"
+                Height="30"
                 VerticalAlignment="Center"
                 DockPanel.Dock="Right" />
 
             <Rectangle
                 Width="1"
-                Height="35"
+                Height="30"
                 DockPanel.Dock="Right"
                 Fill="{StaticResource BorderBrush}" />
 
-            <uc:FullscreenButton x:Name="FullscreenButton" DockPanel.Dock="Right" />
+            <uc:FullscreenButton
+                x:Name="FullscreenButton"
+                Width="30"
+                Height="30"
+                DockPanel.Dock="Right" />
 
             <Rectangle
                 Width="1"
-                Height="35"
+                Height="30"
                 DockPanel.Dock="Right"
                 Fill="{StaticResource BorderBrush}" />
 
             <uc:MinButton
                 x:Name="MinButton"
+                Width="30"
+                Height="30"
                 VerticalAlignment="Center"
                 DockPanel.Dock="Right" />
 
             <Rectangle
                 Width="1"
-                Height="35"
+                Height="30"
                 DockPanel.Dock="Right"
                 Fill="{StaticResource BorderBrush}" />
 
@@ -67,24 +75,24 @@
 
         <Grid
             x:Name="LowerBar"
-            Height="35"
+            Height="30"
             MinWidth="444"
             Background="{StaticResource WindowBackgroundColorBrush}"
             DockPanel.Dock="Bottom">
 
             <Canvas
                 Width="404"
-                Height="35"
+                Height="30"
                 HorizontalAlignment="Center"
                 Background="{StaticResource BackgroundSubtleHighlightBrush}">
 
                 <Rectangle
                     Width="1"
-                    Height="35"
+                    Height="30"
                     Fill="{StaticResource BorderBrush}" />
 
                 <Rectangle
-                    Canvas.Top="34"
+                    Canvas.Top="30"
                     Width="56"
                     Height="1"
                     Fill="{StaticResource BorderBrush}" />
@@ -93,7 +101,7 @@
                     x:Name="FileMenuButton"
                     Canvas.Left="1"
                     Width="55"
-                    Height="35"
+                    Height="30"
                     FocusVisualStyle="{x:Null}"
                     Focusable="False">
                     <Button.Background>
@@ -115,12 +123,12 @@
                     Canvas.Left="56"
                     Canvas.Top="0"
                     Width="1"
-                    Height="35"
+                    Height="30"
                     Fill="{StaticResource BorderBrush}" />
 
                 <Rectangle
                     Canvas.Left="57"
-                    Canvas.Top="34"
+                    Canvas.Top="30"
                     Width="56"
                     Height="1"
                     Fill="{StaticResource BorderBrush}" />
@@ -129,7 +137,7 @@
                     x:Name="image_button"
                     Canvas.Left="57"
                     Width="55"
-                    Height="35"
+                    Height="30"
                     FocusVisualStyle="{x:Null}"
                     Focusable="False">
                     <Button.Background>
@@ -137,7 +145,7 @@
                     </Button.Background>
                     <Canvas
                         Width="28"
-                        Height="31"
+                        Height="28"
                         Margin="14,0,0,0">
                         <Path
                             x:Name="ImagePath1"
@@ -182,11 +190,11 @@
                 <Canvas
                     Canvas.Left="112"
                     Width="182"
-                    Height="35"
+                    Height="30"
                     Background="{StaticResource BackgroundColorBrushFadeSubtle}">
 
                     <Rectangle
-                        Canvas.Top="34"
+                        Canvas.Top="30"
                         Width="182"
                         Height="1"
                         Fill="{StaticResource BorderBrush}" />
@@ -195,7 +203,7 @@
                         Canvas.Left="90"
                         Canvas.Top="0"
                         Width="1"
-                        Height="35"
+                        Height="30"
                         Fill="{StaticResource BorderBrush}" />
                     <Rectangle
                         Canvas.Left="0"
@@ -218,7 +226,7 @@
 
                 <Rectangle
                     Canvas.Left="294"
-                    Canvas.Top="34"
+                    Canvas.Top="30"
                     Width="56"
                     Height="1"
                     Fill="{StaticResource BorderBrush}" />
@@ -227,14 +235,14 @@
                     Canvas.Left="349"
                     Canvas.Top="0"
                     Width="1"
-                    Height="35"
+                    Height="30"
                     Fill="{StaticResource BorderBrush}" />
 
                 <Button
                     x:Name="SettingsButton"
                     Canvas.Left="294"
                     Width="55"
-                    Height="35"
+                    Height="30"
                     Margin="0"
                     FocusVisualStyle="{x:Null}"
                     Focusable="False">
@@ -255,7 +263,7 @@
 
                 <Rectangle
                     Canvas.Left="349"
-                    Canvas.Top="34"
+                    Canvas.Top="30"
                     Width="56"
                     Height="1"
                     Fill="{StaticResource BorderBrush}" />
@@ -265,7 +273,7 @@
                     Canvas.Left="349"
                     Canvas.Top="0"
                     Width="55"
-                    Height="35"
+                    Height="30"
                     FocusVisualStyle="{x:Null}"
                     Focusable="False">
                     <Button.Background>

+ 4 - 4
PicView/Views/Windows/SettingsWindow.xaml

@@ -22,7 +22,7 @@
     <DockPanel Background="{StaticResource NoisyBg}">
         <Grid
             x:Name="TitleBar"
-            Height="35"
+            Height="30"
             Background="{StaticResource WindowBackgroundColorBrush}"
             DockPanel.Dock="Top">
 
@@ -30,14 +30,14 @@
 
             <uc:MinButton
                 x:Name="MinButton"
-                Width="35"
+                Width="30"
                 Margin="0,0,35,0"
                 HorizontalAlignment="Right"
                 VerticalAlignment="Center" />
 
             <uc:CloseButton
                 x:Name="CloseButton"
-                Width="35"
+                Width="30"
                 HorizontalAlignment="Right"
                 VerticalAlignment="Center" />
         </Grid>
@@ -293,7 +293,7 @@
 
                         <TextBox
                             x:Name="txtSlide"
-                            Width="35"
+                            Width="30"
                             Margin="5,3"
                             HorizontalAlignment="Right"
                             VerticalAlignment="Center"

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels