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

+ 1 - 1
PicView/UILogic/ConfigureWindows.cs

@@ -139,7 +139,7 @@ namespace PicView.UILogic
         {
             if (GetImageInfoWindow == null)
             {
-                GetImageInfoWindow = new ImageInfoWindow { Owner = GetMainWindow };
+                GetImageInfoWindow = new();
 
                 GetImageInfoWindow.Show();
             }

+ 132 - 119
PicView/Views/Windows/ImageInfoWindow.xaml

@@ -18,32 +18,100 @@
     mc:Ignorable="d">
 
     <Window.Resources>
-        <StackPanel x:Key="GPS" Orientation="Horizontal" Height="20" Margin="0,10,0,5">
-            <Rectangle Width="372" Height="1" Fill="{StaticResource BorderBrush}" Margin="0,0,7,0" />
-            <Path Fill="{StaticResource IconColorBrush}" Stretch="Uniform" Data="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"/>
-            <Rectangle Width="372" Height="1" Fill="{StaticResource BorderBrush}" Margin="7,0,0,0" />
+        <StackPanel
+            x:Key="GPS"
+            Height="20"
+            Margin="0,10,0,5"
+            Orientation="Horizontal">
+            <Rectangle
+                Width="372"
+                Height="1"
+                Margin="0,0,7,0"
+                Fill="{StaticResource BorderBrush}" />
+            <Path
+                Data="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"
+                Fill="{StaticResource IconColorBrush}"
+                Stretch="Uniform" />
+            <Rectangle
+                Width="372"
+                Height="1"
+                Margin="7,0,0,0"
+                Fill="{StaticResource BorderBrush}" />
         </StackPanel>
 
-        <StackPanel x:Key="Origin" Orientation="Horizontal" Height="20" Margin="0,10,0,5">
-            <Rectangle Width="372" Height="1" Fill="{StaticResource BorderBrush}" Margin="0,0,7,0" />
-            <Path Fill="{StaticResource IconColorBrush}" Stretch="Uniform" Data="M256 8C118.941 8 8 118.919 8 256c0 137.059 110.919 248 248 248 48.154 0 95.342-14.14 135.408-40.223 12.005-7.815 14.625-24.288 5.552-35.372l-10.177-12.433c-7.671-9.371-21.179-11.667-31.373-5.129C325.92 429.757 291.314 440 256 440c-101.458 0-184-82.542-184-184S154.542 72 256 72c100.139 0 184 57.619 184 160 0 38.786-21.093 79.742-58.17 83.693-17.349-.454-16.91-12.857-13.476-30.024l23.433-121.11C394.653 149.75 383.308 136 368.225 136h-44.981a13.518 13.518 0 0 0-13.432 11.993l-.01.092c-14.697-17.901-40.448-21.775-59.971-21.775-74.58 0-137.831 62.234-137.831 151.46 0 65.303 36.785 105.87 96 105.87 26.984 0 57.369-15.637 74.991-38.333 9.522 34.104 40.613 34.103 70.71 34.103C462.609 379.41 504 307.798 504 232 504 95.653 394.023 8 256 8zm-21.68 304.43c-22.249 0-36.07-15.623-36.07-40.771 0-44.993 30.779-72.729 58.63-72.729 22.292 0 35.601 15.241 35.601 40.77 0 45.061-33.875 72.73-58.161 72.73z"/>
-            <Rectangle Width="372" Height="1" Fill="{StaticResource BorderBrush}" Margin="7,0,0,0" />
+        <StackPanel
+            x:Key="Origin"
+            Height="20"
+            Margin="0,10,0,5"
+            Orientation="Horizontal">
+            <Rectangle
+                Width="372"
+                Height="1"
+                Margin="0,0,7,0"
+                Fill="{StaticResource BorderBrush}" />
+            <Path
+                Data="M256 8C118.941 8 8 118.919 8 256c0 137.059 110.919 248 248 248 48.154 0 95.342-14.14 135.408-40.223 12.005-7.815 14.625-24.288 5.552-35.372l-10.177-12.433c-7.671-9.371-21.179-11.667-31.373-5.129C325.92 429.757 291.314 440 256 440c-101.458 0-184-82.542-184-184S154.542 72 256 72c100.139 0 184 57.619 184 160 0 38.786-21.093 79.742-58.17 83.693-17.349-.454-16.91-12.857-13.476-30.024l23.433-121.11C394.653 149.75 383.308 136 368.225 136h-44.981a13.518 13.518 0 0 0-13.432 11.993l-.01.092c-14.697-17.901-40.448-21.775-59.971-21.775-74.58 0-137.831 62.234-137.831 151.46 0 65.303 36.785 105.87 96 105.87 26.984 0 57.369-15.637 74.991-38.333 9.522 34.104 40.613 34.103 70.71 34.103C462.609 379.41 504 307.798 504 232 504 95.653 394.023 8 256 8zm-21.68 304.43c-22.249 0-36.07-15.623-36.07-40.771 0-44.993 30.779-72.729 58.63-72.729 22.292 0 35.601 15.241 35.601 40.77 0 45.061-33.875 72.73-58.161 72.73z"
+                Fill="{StaticResource IconColorBrush}"
+                Stretch="Uniform" />
+            <Rectangle
+                Width="372"
+                Height="1"
+                Margin="7,0,0,0"
+                Fill="{StaticResource BorderBrush}" />
         </StackPanel>
 
-        <StackPanel x:Key="Image" Orientation="Horizontal" Height="20" Margin="0,10,0,5">
-            <Rectangle Width="372" Height="1" Fill="{StaticResource BorderBrush}" Margin="0,0,7,0" />
-            <Path Fill="{StaticResource IconColorBrush}" Stretch="Uniform" Data="M384 121.941V128H256V0h6.059a24 24 0 0 1 16.97 7.029l97.941 97.941a24.002 24.002 0 0 1 7.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z"/>
-            <Rectangle Width="372" Height="1" Fill="{StaticResource BorderBrush}" Margin="7,0,0,0" />
+        <StackPanel
+            x:Key="Image"
+            Height="20"
+            Margin="0,10,0,5"
+            Orientation="Horizontal">
+            <Rectangle
+                Width="372"
+                Height="1"
+                Margin="0,0,7,0"
+                Fill="{StaticResource BorderBrush}" />
+            <Path
+                Data="M384 121.941V128H256V0h6.059a24 24 0 0 1 16.97 7.029l97.941 97.941a24.002 24.002 0 0 1 7.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z"
+                Fill="{StaticResource IconColorBrush}"
+                Stretch="Uniform" />
+            <Rectangle
+                Width="372"
+                Height="1"
+                Margin="7,0,0,0"
+                Fill="{StaticResource BorderBrush}" />
         </StackPanel>
-        
-        <StackPanel x:Key="Film" Orientation="Horizontal" Height="20" Margin="0,10,0,5">
-            <Rectangle Width="372" Height="1" Fill="{StaticResource BorderBrush}" Margin="0,0,7,0" />
-            <Path Fill="{StaticResource IconColorBrush}" Stretch="Uniform" Data="M488 64h-8v20c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V64H96v20c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12V64h-8C10.7 64 0 74.7 0 88v336c0 13.3 10.7 24 24 24h8v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h320v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h8c13.3 0 24-10.7 24-24V88c0-13.3-10.7-24-24-24zM96 372c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm272 208c0 6.6-5.4 12-12 12H156c-6.6 0-12-5.4-12-12v-96c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v96zm0-168c0 6.6-5.4 12-12 12H156c-6.6 0-12-5.4-12-12v-96c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v96zm112 152c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40z"/>
-            <Rectangle Width="372" Height="1" Fill="{StaticResource BorderBrush}" Margin="7,0,0,0" />
+
+        <StackPanel
+            x:Key="Film"
+            Height="20"
+            Margin="0,10,0,5"
+            Orientation="Horizontal">
+            <Rectangle
+                Width="372"
+                Height="1"
+                Margin="0,0,7,0"
+                Fill="{StaticResource BorderBrush}" />
+            <Path
+                Data="M488 64h-8v20c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V64H96v20c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12V64h-8C10.7 64 0 74.7 0 88v336c0 13.3 10.7 24 24 24h8v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h320v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h8c13.3 0 24-10.7 24-24V88c0-13.3-10.7-24-24-24zM96 372c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm272 208c0 6.6-5.4 12-12 12H156c-6.6 0-12-5.4-12-12v-96c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v96zm0-168c0 6.6-5.4 12-12 12H156c-6.6 0-12-5.4-12-12v-96c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v96zm112 152c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40z"
+                Fill="{StaticResource IconColorBrush}"
+                Stretch="Uniform" />
+            <Rectangle
+                Width="372"
+                Height="1"
+                Margin="7,0,0,0"
+                Fill="{StaticResource BorderBrush}" />
         </StackPanel>
 
-        <StackPanel x:Key="Camera" Orientation="Horizontal" Height="20" Margin="0,10,0,5">
-            <Rectangle Width="372" Height="1" Fill="{StaticResource BorderBrush}" Margin="0,0,7,0" />
+        <StackPanel
+            x:Key="Camera"
+            Height="20"
+            Margin="0,10,0,5"
+            Orientation="Horizontal">
+            <Rectangle
+                Width="372"
+                Height="1"
+                Margin="0,0,7,0"
+                Fill="{StaticResource BorderBrush}" />
             <Image>
                 <Image.Source>
                     <DrawingImage>
@@ -55,9 +123,22 @@
                     </DrawingImage>
                 </Image.Source>
             </Image>
-            <Rectangle Width="372" Height="1" Fill="{StaticResource BorderBrush}" Margin="7,0,0,0" />
+            <Rectangle
+                Width="372"
+                Height="1"
+                Margin="7,0,0,0"
+                Fill="{StaticResource BorderBrush}" />
         </StackPanel>
 
+        <Style x:Key="bgRoundedConer" TargetType="Border">
+            <Setter Property="Width" Value="37" />
+            <Setter Property="Height" Value="35" />
+            <Setter Property="Margin" Value="10,0,0,0" />
+            <Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
+            <Setter Property="BorderThickness" Value="1" />
+            <Setter Property="CornerRadius" Value="2" />
+        </Style>
+
     </Window.Resources>
 
     <DockPanel>
@@ -221,7 +302,11 @@
 
         </DockPanel>
 
-        <Border x:Name="MainBackground" Background="{StaticResource NoisyBg}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1">
+        <Border
+            x:Name="MainBackground"
+            Background="{StaticResource NoisyBg}"
+            BorderBrush="{StaticResource BorderBrush}"
+            BorderThickness="1">
             <ScrollViewer
                 x:Name="Scroller"
                 CanContentScroll="False"
@@ -249,12 +334,7 @@
                                     Width="180"
                                     d:Text="404.jpg"
                                     IsReadOnly="False" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="FilenameCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -274,12 +354,7 @@
                                     Width="180"
                                     d:Text="D:\Pictures"
                                     IsReadOnly="False" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="FolderCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -298,12 +373,7 @@
                                     Width="180"
                                     d:Text="D:\Pictures\404.jpg"
                                     IsReadOnly="False" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="FullpathCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -321,12 +391,7 @@
                                     x:Name="CreatedBox"
                                     Width="180"
                                     d:Text="8/9/2019 - 10:37:42 PM" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="CreatedCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -344,12 +409,7 @@
                                     x:Name="ModifiedBox"
                                     Width="180"
                                     d:Text="12/10/2018 - 7:41:14 PM" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="ModifiedCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -367,12 +427,7 @@
                                     x:Name="AccessedBox"
                                     Width="180"
                                     d:Text="Today, ‎October ‎25, ‎2021, ‏‎11:29 AM" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="Accessedopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -390,12 +445,7 @@
                                     x:Name="BitDepthBox"
                                     Width="180"
                                     d:Text="24" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="BitDepthCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -415,15 +465,10 @@
                                 <TextBox
                                     x:Name="WidthBox"
                                     Width="180"
+                                    d:Text="1920"
                                     IsReadOnly="False"
-                                    ToolTip="{StaticResource SizeTooltip}"
-                                    d:Text="1920" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                    ToolTip="{StaticResource SizeTooltip}" />
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="WidthCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -439,16 +484,11 @@
                                     ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=Text}" />
                                 <TextBox
                                     x:Name="HeightBox"
-                                    ToolTip="{StaticResource SizeTooltip}"
                                     Width="180"
+                                    d:Text="1080"
                                     IsReadOnly="False"
-                                    d:Text="1080" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                    ToolTip="{StaticResource SizeTooltip}" />
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="HeightCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -466,12 +506,7 @@
                                     x:Name="SizeMpBox"
                                     Width="180"
                                     d:Text="2.1 Megapixels" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="SizeMpCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -489,12 +524,7 @@
                                     x:Name="ResolutionBox"
                                     Width="180"
                                     d:Text="96 x 96 DPI" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="DpiCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -512,12 +542,7 @@
                                     x:Name="PrintSizeCmBox"
                                     Width="180"
                                     d:Text="50.8 x 28.58 centimeters" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="PrintSizeCmCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -535,12 +560,7 @@
                                     x:Name="PrintSizeInBox"
                                     Width="180"
                                     d:Text="20 x 11.25 inches" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="PrintSizeInCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -558,12 +578,7 @@
                                     x:Name="AspectRatioBox"
                                     Width="180"
                                     d:Text="16:9 (Landscape)" />
-                                <Border
-                                    Width="37"
-                                    Height="35"
-                                    Margin="10,0,0,0"
-                                    BorderBrush="{StaticResource BorderBrush}"
-                                    BorderThickness="1">
+                                <Border Style="{StaticResource bgRoundedConer}">
                                     <uc:CopyButton x:Name="AspectRatioCopy" ToolTip="{StaticResource Copy}" />
                                 </Border>
                             </StackPanel>
@@ -572,10 +587,10 @@
                     </StackPanel>
 
 
-                    <StackPanel DockPanel.Dock="Bottom" Margin="0,7,0,0">
-                        
-                        <Border BorderThickness="0,1,0,1" BorderBrush="{StaticResource BorderBrush}">
-                            <Button Height="25" x:Name="ExpandButton">
+                    <StackPanel Margin="0,7,0,0" DockPanel.Dock="Bottom">
+
+                        <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>
@@ -584,7 +599,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>
@@ -596,13 +611,11 @@
                                 </Image>
                             </Button>
                         </Border>
-                        <WrapPanel 
+                        <WrapPanel
                             x:Name="ExifParent"
                             Margin="10,5,10,10"
-                            Orientation="Horizontal"
-                            HorizontalAlignment="Center">
-
-                        </WrapPanel>
+                            HorizontalAlignment="Center"
+                            Orientation="Horizontal" />
                     </StackPanel>
 
                 </DockPanel>

+ 21 - 5
PicView/Views/Windows/ResizeWindow.xaml

@@ -8,7 +8,7 @@
     Width="500"
     AllowDrop="False"
     BorderBrush="{DynamicResource WindowBorderColorBrush}"
-    BorderThickness="1"
+    BorderThickness="1.2"
     FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto"
     Foreground="{StaticResource MainColorBrush}"
     ResizeMode="CanMinimize"
@@ -54,9 +54,10 @@
                 Margin="0,0,0,0"
                 VerticalAlignment="Center"
                 FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Bold"
-                FontSize="14"
+                FontSize="13"
                 Text="{StaticResource BatchResize}"
                 TextAlignment="Center" />
+
         </DockPanel>
 
         <Rectangle
@@ -227,6 +228,7 @@
                 <TextBlock Text="Percentage" />
 
                 <TextBox
+                    x:Name="PercentageBox"
                     Width="65"
                     IsReadOnly="False"
                     Text="90" />
@@ -287,14 +289,28 @@
                 <StackPanel x:Name="GeneratedThumbnailsContainer" />
             </ScrollViewer>
 
+
             <TextBox
                 Height="150"
-                Margin="15,15,15,0"
+                Margin="10,12,10,0"
                 BorderThickness="1.5"
                 Effect="{StaticResource MenuShadowButtonBorder}"
                 Text="B:\Pictures\new folder.jpg 114.5 kb 🠚 B:\Pictures\another new folder.webp 80.4 kb"
                 ToolTip="{x:Null}" />
 
+            <Border
+                Margin="10,11,10,0"
+                BorderBrush="{StaticResource BorderBrush}"
+                BorderThickness="1"
+                CornerRadius="2">
+                <ProgressBar
+                    x:Name="ProgressBar"
+                    Height="20"
+                    Background="{StaticResource AltInterfaceBrush}"
+                    BorderThickness="0"
+                    Value="20" />
+            </Border>
+
             <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
 
                 <Border
@@ -309,7 +325,7 @@
                     Focusable="False">
                     <Label
                         x:Name="StartButton"
-                        Padding="20,10,20,10"
+                        Padding="20,7,20,7"
                         Content="Start"
                         FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Medium">
                         <Label.Background>
@@ -333,7 +349,7 @@
                     Focusable="False">
                     <Label
                         x:Name="CencelButton"
-                        Padding="10"
+                        Padding="10,7,10,7"
                         Content="Cancel"
                         FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Medium">
                         <Label.Background>

+ 60 - 10
PicView/Views/Windows/ResizeWindow.xaml.cs

@@ -1,7 +1,9 @@
 using PicView.Animations;
 using PicView.ChangeImage;
+using PicView.UILogic;
 using PicView.UILogic.Sizing;
 using System.IO;
+using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Input;
@@ -28,6 +30,8 @@ namespace PicView.Views.Windows
 
             ContentRendered += (sender, e) =>
             {
+                Owner = null; // Remove owner, so that minizing mainwindow will not minize this
+
                 if (Error_Handling.CheckOutOfRange() == false)
                 {
                     SourceFolderInput.Text = Path.GetDirectoryName(Navigation.Pics[Navigation.FolderIndex]);
@@ -58,47 +62,47 @@ namespace PicView.Views.Windows
                 ThumbnailsComboBox.SelectionChanged += delegate
                 {
                     var selected = (ComboBoxItem)ThumbnailsComboBox.SelectedItem;
-                    if (int.TryParse(selected?.Content.ToString(), out var count)) 
+                    if (int.TryParse(selected?.Content.ToString(), out var count))
                     {
                         GeneratedThumbnailsContainer.Children.Clear();
 
                         if (count <= 0) { return; }
 
                         var size = new string[count + 1];
-                        var newSize = new string[size.Length]; 
+                        var newSize = new string[size.Length];
                         switch (count)
                         {
-                            case 7: 
+                            case 7:
                                 size[7] = "xxs"; size[6] = "xs"; size[5] = "small"; size[4] = "medium"; size[3] = "large"; size[2] = "xl"; size[1] = "xxl";
-                                newSize[7] = "20"; newSize[6] = "30"; newSize[5] = "40"; newSize[4] = "50"; newSize[3] = "60"; newSize[2] = "70"; newSize[1] = "80"; 
+                                newSize[7] = "20"; newSize[6] = "30"; newSize[5] = "40"; newSize[4] = "50"; newSize[3] = "60"; newSize[2] = "70"; newSize[1] = "80";
                                 break;
 
-                            case 6: 
+                            case 6:
                                 size[6] = "xxs"; size[5] = "xs"; size[4] = "small"; size[3] = "medium"; size[2] = "large"; size[1] = "xl";
                                 newSize[6] = "20"; newSize[5] = "30"; newSize[4] = "40"; newSize[3] = "50"; newSize[2] = "60"; newSize[1] = "70";
                                 break;
 
-                            case 5: 
+                            case 5:
                                 size[5] = "xs"; size[4] = "small"; size[3] = "medium"; size[2] = "large"; size[1] = "xl";
                                 newSize[5] = "20"; newSize[4] = "30"; newSize[3] = "50"; newSize[2] = "60"; newSize[1] = "70";
                                 break;
 
-                            case 4: 
+                            case 4:
                                 size[4] = "xs"; size[3] = "small"; size[2] = "medium"; size[1] = "large";
                                 newSize[4] = "25"; newSize[3] = "40"; newSize[2] = "50"; newSize[1] = "70";
                                 break;
 
-                            case 3: 
+                            case 3:
                                 size[3] = "small"; size[2] = "medium"; size[1] = "large";
                                 newSize[3] = "25"; newSize[2] = "50"; newSize[1] = "70";
                                 break;
 
-                            case 2: 
+                            case 2:
                                 size[1] = "small"; size[2] = "medium";
                                 newSize[1] = "30"; newSize[2] = "50";
                                 break;
 
-                            default: 
+                            default:
                                 size[1] = "small";
                                 newSize[1] = "30";
                                 break;
@@ -129,6 +133,52 @@ namespace PicView.Views.Windows
                 StartButton.MouseLeave += delegate { MouseOverAnimations.ButtonMouseLeaveAnim(StartText); };
                 StartButton.MouseLeave += delegate { AnimationHelper.MouseLeaveBgTexColor(StartBrush); };
 
+                StartButton.MouseLeftButtonDown += async delegate
+                {
+                    bool toResize = NoResize.IsSelected == false;
+                    double ResizeAmount = 0;
+                    ImageMagick.Percentage? percentage = null;
+
+                    if (toResize)
+                    {
+                        if (PercentageResize.IsSelected && int.TryParse(PercentageBox.Text, out var number))
+                        {
+                            percentage = new ImageMagick.Percentage(number);
+                        }
+                        else
+                        {
+                            if (WidthResize.IsSelected && int.TryParse(WidthResize.Content.ToString(), out var resizeWidth))
+                            {
+                                ResizeAmount = resizeWidth;
+                            }
+                            else if (HeightResize.IsSelected && int.TryParse(HeightResize.Content.ToString(), out var resizeHeight))
+                            {
+                                ResizeAmount = resizeHeight;
+                            }
+                        }
+                    }
+
+                    bool sameDir = false;
+                    if (Error_Handling.CheckOutOfRange() == false)
+                    {
+                        sameDir = Path.GetDirectoryName(Navigation.Pics[0]) == Path.GetDirectoryName(SourceFolderInput.Text);
+                    }
+
+                    var sourceFileist = sameDir ? Navigation.Pics : FileHandling.FileLists.FileList(new FileInfo(SourceFolderInput.Text));
+
+                    await Task.Run(() =>
+                    {
+                        Parallel.For(0, sourceFileist.Count, i =>
+                        {
+                            if (toResize)
+                            {
+
+                            }
+                        });
+                    });
+
+                };
+
                 CencelButton.MouseEnter += delegate { MouseOverAnimations.ButtonMouseOverAnim(CencelText); };
                 CencelButton.MouseEnter += delegate { AnimationHelper.MouseEnterBgTexColor(CancelBrush); };
                 CencelButton.MouseLeave += delegate { MouseOverAnimations.ButtonMouseLeaveAnim(CencelText); };