Ruben 4 лет назад
Родитель
Сommit
ecdd3265a4

+ 1 - 1
PicView/FileHandling/FileFunctions.cs

@@ -51,7 +51,7 @@ namespace PicView.FileHandling
                 fileArray = new IntPtr[] { nativeFile };
             }
 
-            int v = SHOpenFolderAndSelectItems(nativeFolder, (uint)fileArray.Length, fileArray, 0);
+            _= SHOpenFolderAndSelectItems(nativeFolder, (uint)fileArray.Length, fileArray, 0);
 
             Marshal.FreeCoTaskMem(nativeFolder);
             if (nativeFile != IntPtr.Zero)

+ 31 - 25
PicView/Views/UserControls/Misc/QuickResize.xaml

@@ -1,15 +1,15 @@
 <UserControl
+    x:Class="PicView.Views.UserControls.QuickResize"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:UserControls="clr-namespace:PicView.Views.UserControls"
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-    x:Class="PicView.Views.UserControls.QuickResize"
+    d:DesignHeight="300"
     BorderBrush="{DynamicResource WindowBorderColorBrush}"
     BorderThickness="1"
     FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto"
     Foreground="{StaticResource MainColorBrush}"
-    d:DesignHeight="300"
     mc:Ignorable="d">
 
     <Grid x:Name="grid">
@@ -19,8 +19,7 @@
             Height="{Binding ActualHeight, ElementName=grid}"
             Background="{StaticResource BackgroundColorBrushFade}"
             BorderBrush="{StaticResource BorderBrush}"
-            BorderThickness="1,0,1,0">
-        </Border>
+            BorderThickness="1,0,1,0" />
 
         <UserControls:X2
             x:Name="x2"
@@ -28,24 +27,24 @@
             VerticalAlignment="Top"
             Panel.ZIndex="1" />
 
-        <Label 
-            Content="{StaticResource ResizeImage}"
+        <Label
+            Margin="0,0,0,115"
             HorizontalAlignment="Center"
             VerticalAlignment="Center"
-            Margin="0,0,0,115" />
+            Content="{StaticResource ResizeImage}" />
 
-        <TextBlock 
-            Text="{StaticResource CropMessage}"
+        <TextBlock
+            Margin="0,0,0,67"
             HorizontalAlignment="Center"
             VerticalAlignment="Center"
-            Margin="0,0,0,67"/>
+            Text="{StaticResource CropMessage}" />
 
-        <Border 
+        <Border
+            HorizontalAlignment="Center"
+            VerticalAlignment="Center"
             Background="{StaticResource NoisyBg}"
             BorderBrush="{StaticResource BorderBrush}"
-            BorderThickness="1"
-            HorizontalAlignment="Center"
-            VerticalAlignment="Center">
+            BorderThickness="1">
 
             <DockPanel HorizontalAlignment="Center">
 
@@ -60,14 +59,14 @@
                     <TextBox
                         x:Name="WidthBox"
                         Width="55"
+                        d:Text="1920"
                         IsReadOnly="False"
-                        ToolTip="{StaticResource SizeTooltip}"
-                        d:Text="1920" />
+                        ToolTip="{StaticResource SizeTooltip}" />
                 </StackPanel>
 
                 <StackPanel Orientation="Horizontal">
                     <TextBlock
-                        Margin="10,0,10,0" 
+                        Margin="10,0,10,0"
                         VerticalAlignment="Center"
                         FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Bold"
                         FontSize="14"
@@ -75,16 +74,23 @@
                         ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}" />
                     <TextBox
                         x:Name="HeightBox"
-                        ToolTip="{StaticResource SizeTooltip}"
                         Width="55"
+                        d:Text="1080"
                         IsReadOnly="False"
-                        d:Text="1080" />
+                        ToolTip="{StaticResource SizeTooltip}" />
                 </StackPanel>
 
-                <Label Content="⇔" VerticalAlignment="Center" Margin="10,0,10,0"/>
+                <Label
+                    Margin="10,0,10,0"
+                    VerticalAlignment="Center"
+                    Content="⇔" />
 
-                <ComboBox x:Name="PercentageBox" KeyboardNavigation.DirectionalNavigation="Cycle" Width="80" MinWidth="70">
-                    <ComboBoxItem IsSelected="True" Content="100%" />
+                <ComboBox
+                    x:Name="PercentageBox"
+                    Width="80"
+                    MinWidth="70"
+                    KeyboardNavigation.DirectionalNavigation="Cycle">
+                    <ComboBoxItem Content="100%" IsSelected="True" />
                     <ComboBoxItem Content="90%" />
                     <ComboBoxItem Content="80%" />
                     <ComboBoxItem Content="70%" />
@@ -98,10 +104,10 @@
 
                 <Label
                     x:Name="ApplyButton"
+                    Margin="5,0,5,0"
+                    VerticalAlignment="Center"
                     Background="{DynamicResource BorderBrushAlt}"
-                    Content="{StaticResource Apply}" 
-                    Margin="5,0,5,0" 
-                    VerticalAlignment="Center">
+                    Content="{StaticResource Apply}">
                     <Label.Foreground>
                         <SolidColorBrush x:Name="ApplyBrush" Color="{DynamicResource ChosenColor}" />
                     </Label.Foreground>

+ 23 - 44
PicView/Views/Windows/InfoWindow.xaml

@@ -34,7 +34,7 @@
             Background="{StaticResource WindowBackgroundColorBrush}"
             DockPanel.Dock="Top">
 
-            <uc:Icon Width="35"/>
+            <uc:Icon Width="35" />
 
             <Rectangle
                 Width="1"
@@ -203,8 +203,8 @@
 
                 </StackPanel>
 
-                <Border BorderThickness="0,1,0,1" BorderBrush="{StaticResource BorderBrush}">
-                    <Button Height="25" x:Name="ExpandButton">
+                <Border BorderBrush="{StaticResource BorderBrush}" BorderThickness="0,1,0,1">
+                    <Button x:Name="ExpandButton" Height="25">
                         <Button.Background>
                             <SolidColorBrush x:Name="ExpandButtonBg" Color="{StaticResource BackgroundColorFadeSubtle}" />
                         </Button.Background>
@@ -213,7 +213,7 @@
                                 <DrawingImage>
                                     <DrawingImage.Drawing>
                                         <DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
-                                            <GeometryDrawing x:Name="xGeo" Geometry="F1 M512,512z M0,0z M98,190.06L237.78,353.18A24,24,0,0,0,274.22,353.18L414,190.06C427.34,174.49,416.28,150.44,395.78,150.44L116.18,150.44C95.6799999999999,150.44,84.6199999999999,174.49,97.9999999999999,190.06z" >
+                                            <GeometryDrawing x:Name="xGeo" Geometry="F1 M512,512z M0,0z M98,190.06L237.78,353.18A24,24,0,0,0,274.22,353.18L414,190.06C427.34,174.49,416.28,150.44,395.78,150.44L116.18,150.44C95.6799999999999,150.44,84.6199999999999,174.49,97.9999999999999,190.06z">
                                                 <GeometryDrawing.Brush>
                                                     <SolidColorBrush x:Name="chevronDownBrush" Color="{StaticResource IconColor}" />
                                                 </GeometryDrawing.Brush>
@@ -680,8 +680,7 @@
                         Padding="0,3,0,3"
                         Background="{StaticResource BackgroundColorBrush}"
                         BorderBrush="{StaticResource BorderBrush}"
-                        BorderThickness="1,1,1,1">
-                    </Border>
+                        BorderThickness="1,1,1,1" />
 
                     <Border
                         Grid.Row="4"
@@ -725,8 +724,7 @@
                         Padding="0,3,0,3"
                         Background="{StaticResource BackgroundSubtleHighlightBrush}"
                         BorderBrush="{StaticResource BorderBrush}"
-                        BorderThickness="1,1,1,1">
-                    </Border>
+                        BorderThickness="1,1,1,1" />
 
                     <Border
                         Grid.Row="5"
@@ -766,16 +764,12 @@
                             HorizontalAlignment="Center"
                             VerticalAlignment="Center"
                             Orientation="Horizontal">
-                            <TextBlock
-                                FontSize="12"
-                                Text="{StaticResource ResourceKey=Ctrl}" />
+                            <TextBlock FontSize="12" Text="{StaticResource ResourceKey=Ctrl}" />
                             <TextBlock
                                 FontSize="12"
                                 Foreground="{StaticResource MainColorFadedBrush}"
                                 Text=" + " />
-                            <TextBlock
-                                FontSize="12"
-                                Text="{StaticResource ResourceKey=Alt}" />
+                            <TextBlock FontSize="12" Text="{StaticResource ResourceKey=Alt}" />
                             <TextBlock
                                 FontSize="12"
                                 Foreground="{StaticResource MainColorFadedBrush}"
@@ -1659,16 +1653,12 @@
                             HorizontalAlignment="Center"
                             VerticalAlignment="Center"
                             Orientation="Horizontal">
-                            <TextBlock
-                                FontSize="12"
-                                Text="{StaticResource ResourceKey=Ctrl}" />
+                            <TextBlock FontSize="12" Text="{StaticResource ResourceKey=Ctrl}" />
                             <TextBlock
                                 FontSize="12"
                                 Foreground="{StaticResource MainColorFadedBrush}"
                                 Text=" + " />
-                            <TextBlock
-                                FontSize="12"
-                                Text="{StaticResource ResourceKey=Alt}" />
+                            <TextBlock FontSize="12" Text="{StaticResource ResourceKey=Alt}" />
                             <TextBlock
                                 FontSize="12"
                                 Foreground="{StaticResource MainColorFadedBrush}"
@@ -1777,9 +1767,7 @@
                                 FontSize="12"
                                 Foreground="{StaticResource MainColorFadedBrush}"
                                 Text=" + " />
-                            <TextBlock
-                                FontSize="12"
-                                Text="{StaticResource ResourceKey=Del}" />
+                            <TextBlock FontSize="12" Text="{StaticResource ResourceKey=Del}" />
                         </StackPanel>
                     </Border>
 
@@ -2029,8 +2017,7 @@
                         Padding="0,3,0,3"
                         Background="{StaticResource BackgroundSubtleHighlightBrush}"
                         BorderBrush="{StaticResource BorderBrush}"
-                        BorderThickness="0,0,1,0">
-                    </Border>
+                        BorderThickness="0,0,1,0" />
 
                     <Border
                         Grid.Row="3"
@@ -2195,16 +2182,12 @@
                             HorizontalAlignment="Center"
                             VerticalAlignment="Center"
                             Orientation="Horizontal">
-                            <TextBlock
-                                FontSize="12"
-                                Text="{StaticResource ResourceKey=Shift}" />
+                            <TextBlock FontSize="12" Text="{StaticResource ResourceKey=Shift}" />
                             <TextBlock
                                 FontSize="12"
                                 Foreground="{StaticResource MainColorFadedBrush}"
                                 Text=" + " />
-                            <TextBlock
-                                FontSize="12"
-                                Text="{StaticResource ResourceKey=DoubleClick}" />
+                            <TextBlock FontSize="12" Text="{StaticResource ResourceKey=DoubleClick}" />
                         </StackPanel>
                     </Border>
 
@@ -2240,16 +2223,12 @@
                             HorizontalAlignment="Center"
                             VerticalAlignment="Center"
                             Orientation="Horizontal">
-                            <TextBlock
-                                FontSize="12"
-                                Text="{StaticResource ResourceKey=Ctrl}" />
+                            <TextBlock FontSize="12" Text="{StaticResource ResourceKey=Ctrl}" />
                             <TextBlock
                                 FontSize="12"
                                 Foreground="{StaticResource MainColorFadedBrush}"
                                 Text=" + " />
-                            <TextBlock
-                                FontSize="12"
-                                Text="N" />
+                            <TextBlock FontSize="12" Text="N" />
                         </StackPanel>
                     </Border>
 
@@ -2436,17 +2415,17 @@
 
                 <StackPanel Margin="0,10,0,15">
 
-                    <Label 
-                        FontSize="16"
-                        FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Black"
+                    <Label
                         HorizontalAlignment="Center"
-                        Content="{StaticResource ResourceKey=Credits}" />
+                        Content="{StaticResource ResourceKey=Credits}"
+                        FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Black"
+                        FontSize="16" />
 
                     <Label
                         Margin="0,0,0,3"
-                        FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Black"
                         HorizontalAlignment="Center"
-                        Content="{StaticResource ResourceKey=IconsUsed}" />
+                        Content="{StaticResource ResourceKey=IconsUsed}"
+                        FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Black" />
 
                     <TextBlock
                         Margin="0,0,0,2"
@@ -2472,7 +2451,7 @@
                         TextAlignment="Center"
                         ToolTip="http://Ionicons.com/">
                         <Hyperlink NavigateUri="http://Ionicons.com/" RequestNavigate="Hyperlink_RequestNavigate">
-                                   Ioinicons
+                            Ioinicons
                             <Hyperlink.Foreground>
                                 <SolidColorBrush x:Name="IonicBrush" Color="{StaticResource MainColor}" />
                             </Hyperlink.Foreground>

+ 41 - 35
PicView/Views/Windows/SettingsWindow.xaml

@@ -37,14 +37,14 @@
                 x:Name="MinButton"
                 Width="30"
                 Height="30"
-                DockPanel.Dock="Right"/>
+                DockPanel.Dock="Right" />
 
-            <TextBlock 
-                Text="{StaticResource Settings}"
+            <TextBlock
+                VerticalAlignment="Center"
                 FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Bold"
                 FontSize="14"
-                VerticalAlignment="Center"
-                TextAlignment="Center"/>
+                Text="{StaticResource Settings}"
+                TextAlignment="Center" />
 
         </DockPanel>
 
@@ -136,11 +136,11 @@
             <TabItem>
                 <TabItem.Header>
                     <TextBlock
-                        Text="{StaticResource GeneralSettings}"
                         MaxWidth="155"
-                        TextWrapping="Wrap"
+                        FontSize="14"
+                        Text="{StaticResource GeneralSettings}"
                         TextTrimming="CharacterEllipsis"
-                        FontSize="14" />
+                        TextWrapping="Wrap" />
                 </TabItem.Header>
 
                 <StackPanel Margin="10,10,10,10">
@@ -162,8 +162,8 @@
                             <TextBlock
                                 Width="279"
                                 Focusable="False"
-                                FontSize="13"
                                 FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto"
+                                FontSize="13"
                                 Text="{StaticResource SearchSubdirectory}" />
                         </CheckBox.Content>
                     </CheckBox>
@@ -179,8 +179,8 @@
                             <TextBlock
                                 Width="279"
                                 Focusable="False"
-                                FontSize="13"
                                 FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto"
+                                FontSize="13"
                                 Text="{StaticResource StayTopMost}" />
                         </CheckBox.Content>
                     </CheckBox>
@@ -197,8 +197,8 @@
                             <TextBlock
                                 Width="279"
                                 Focusable="False"
-                                FontSize="13"
                                 FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto"
+                                FontSize="13"
                                 Text="{StaticResource StayCentered}" />
                         </CheckBox.Content>
                     </CheckBox>
@@ -206,7 +206,10 @@
                     <Label Margin="0,15,0,0" Content="{StaticResource SetAsWallpaper}" />
 
                     <StackPanel Margin="5,9,0,7" Orientation="Horizontal">
-                        <ComboBox x:Name="WallpaperBox" HorizontalAlignment="Left" IsTabStop="False">
+                        <ComboBox
+                            x:Name="WallpaperBox"
+                            HorizontalAlignment="Left"
+                            IsTabStop="False">
                             <ComboBoxItem
                                 x:Name="Fill"
                                 Content="{StaticResource Fill}"
@@ -238,8 +241,8 @@
                     <ComboBox
                         x:Name="LanguageBox"
                         Margin="5,9,0,7"
-                        IsTabStop="False"
-                        HorizontalAlignment="Left" />
+                        HorizontalAlignment="Left"
+                        IsTabStop="False" />
 
                     <TextBlock
                         x:Name="LanguageRestart"
@@ -301,13 +304,16 @@
                         HorizontalAlignment="Left"
                         VerticalAlignment="Center"
                         Content="{StaticResource HorizontalScroll}" />
-                    
-                    <ComboBox 
+
+                    <ComboBox
                         x:Name="ScrollDirection"
-                        IsTabStop="False"
+                        Margin="3,8,0,0"
                         HorizontalAlignment="Left"
-                        Margin="3,8,0,0" >
-                        <ComboBoxItem x:Name="Reverse" Content="{StaticResource Reverse}" IsSelected="True" />
+                        IsTabStop="False">
+                        <ComboBoxItem
+                            x:Name="Reverse"
+                            Content="{StaticResource Reverse}"
+                            IsSelected="True" />
                         <ComboBoxItem Name="Forward" Content="{StaticResource Forward}" />
                     </ComboBox>
 
@@ -344,9 +350,9 @@
                             VerticalAlignment="Center"
                             d:Text="3"
                             IsReadOnly="True"
+                            IsTabStop="False"
                             Text="{Binding ElementName=SlideshowSlider, Path=Value}"
-                            TextAlignment="Center"
-                            IsTabStop="False"/>
+                            TextAlignment="Center" />
 
                         <TextBlock
                             Margin="2,2,0,0"
@@ -389,8 +395,8 @@
                             FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Bold"
                             FontSize="12"
                             IsReadOnly="True"
-                            TextAlignment="Center"
-                            IsTabStop="False"/>
+                            IsTabStop="False"
+                            TextAlignment="Center" />
                     </StackPanel>
 
                 </StackPanel>
@@ -398,25 +404,25 @@
             <TabItem>
                 <TabItem.Header>
                     <TextBlock
-                        Text="{StaticResource UISettings}"
                         MaxWidth="155"
-                        TextWrapping="Wrap"
+                        FontSize="14"
+                        Text="{StaticResource UISettings}"
                         TextTrimming="CharacterEllipsis"
-                        FontSize="14" />
+                        TextWrapping="Wrap" />
                 </TabItem.Header>
-            
+
                 <StackPanel Margin="10">
-                    
+
                     <Label
                         VerticalAlignment="Center"
-                        Foreground="{StaticResource MainColorBrush}"
-                        Content="{StaticResource FullscreenGalleryLayout}"/>
+                        Content="{StaticResource FullscreenGalleryLayout}"
+                        Foreground="{StaticResource MainColorBrush}" />
                     <ComboBox
                         x:Name="GalleryBox"
                         Width="150"
                         Margin="8,2,0,2"
-                        IsTabStop="False"
-                        HorizontalAlignment="Left">
+                        HorizontalAlignment="Left"
+                        IsTabStop="False">
                         <ComboBoxItem
                             x:Name="GalleryVertical"
                             Content="{StaticResource Vertical}"
@@ -442,8 +448,8 @@
                             <TextBlock
                                 Width="279"
                                 Focusable="False"
-                                FontSize="13"
                                 FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto"
+                                FontSize="13"
                                 Text="{StaticResource ColoredWindowBorder}"
                                 TextWrapping="Wrap" />
                         </CheckBox.Content>
@@ -461,8 +467,8 @@
                             <TextBlock
                                 Width="279"
                                 Focusable="False"
-                                FontSize="13"
                                 FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto"
+                                FontSize="13"
                                 Text="{StaticResource ShowButtonsInHiddenUI}"
                                 TextWrapping="Wrap" />
                         </CheckBox.Content>
@@ -476,9 +482,9 @@
 
                     <WrapPanel
                         Margin="5,3,5,8"
-                        ItemWidth="146"
                         HorizontalAlignment="Center"
                         VerticalAlignment="Top"
+                        ItemWidth="146"
                         Orientation="Horizontal">
 
                         <RadioButton