Browse Source

UI updates

Ruben 4 years ago
parent
commit
0ae0ee72d6

+ 12 - 6
PicView/Themes/Styles/TextBox.xaml

@@ -42,15 +42,21 @@
                                 <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource ResourceKey=ChosenColorBrush}" />
                             </MultiTrigger.Setters>
                         </MultiTrigger>
-                        
+
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="IsReadOnly" Value="False" />
+                                <Condition Property="IsFocused" Value="True" />
+                            </MultiTrigger.Conditions>
+                            <MultiTrigger.Setters>
+                                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource ResourceKey=ChosenColorBrush}" />
+                            </MultiTrigger.Setters>
+                        </MultiTrigger>
+
                         <Trigger Property="IsMouseOver" Value="False">
                             <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource ResourceKey=BorderBrush}" />
                         </Trigger>
-                        
-                        <Trigger Property="IsFocused" Value="True">
-                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource ResourceKey=ChosenColorBrush}" />
-                        </Trigger>
-                        
+
                         <Trigger Property="IsReadOnly" Value="True">
                             <Setter TargetName="border" Property="Background" Value="{StaticResource BackgroundColorBrush}"  />
                         </Trigger>

+ 52 - 10
PicView/Views/Windows/ResizeWindow.xaml

@@ -290,19 +290,61 @@
             <TextBox
                 Height="150"
                 Margin="15,15,15,0"
-                FontSize="11"
-                Text="B:\Pictures\new folder.jpg 114.5 kb ==&gt; B:\Pictures\another new folder.webp 80.4 kb"
+                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}" />
 
             <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
-                <Button
-                    Margin="0,10,5,0"
-                    Content="Start"
-                    Style="{StaticResource MetroFlatButton}" />
-                <Button
-                    Margin="10,10,0,0"
-                    Content="Cancel"
-                    Style="{StaticResource MetroFlatButton}" />
+
+                <Border
+                    Margin="0,10,10,0"
+                    HorizontalAlignment="Center"
+                    VerticalAlignment="Center"
+                    Background="{StaticResource BackgroundColorBrushAlt}"
+                    BorderBrush="{StaticResource BorderBrush}"
+                    BorderThickness="1"
+                    CornerRadius="2"
+                    Effect="{StaticResource MenuShadowButtonBorder}"
+                    Focusable="False">
+                    <Label
+                        x:Name="StartButton"
+                        Padding="20,10,20,10"
+                        Content="Start"
+                        FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Medium">
+                        <Label.Background>
+                            <SolidColorBrush x:Name="StartBrush" Color="{StaticResource BackgroundColorAlt}" />
+                        </Label.Background>
+                        <Label.Foreground>
+                            <SolidColorBrush x:Name="StartText" Color="{StaticResource MainColor}" />
+                        </Label.Foreground>
+                    </Label>
+                </Border>
+
+                <Border
+                    Margin="0,10,0,0"
+                    HorizontalAlignment="Center"
+                    VerticalAlignment="Center"
+                    Background="{StaticResource BackgroundColorBrushAlt}"
+                    BorderBrush="{StaticResource BorderBrush}"
+                    BorderThickness="1"
+                    CornerRadius="2"
+                    Effect="{StaticResource MenuShadowButtonBorder}"
+                    Focusable="False">
+                    <Label
+                        x:Name="CencelButton"
+                        Padding="10"
+                        Content="Cancel"
+                        FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Medium">
+                        <Label.Background>
+                            <SolidColorBrush x:Name="CancelBrush" Color="{StaticResource BackgroundColorAlt}" />
+                        </Label.Background>
+                        <Label.Foreground>
+                            <SolidColorBrush x:Name="CencelText" Color="{StaticResource MainColor}" />
+                        </Label.Foreground>
+                    </Label>
+                </Border>
+
             </StackPanel>
 
         </StackPanel>

+ 13 - 6
PicView/Views/Windows/ResizeWindow.xaml.cs

@@ -1,4 +1,5 @@
-using PicView.ChangeImage;
+using PicView.Animations;
+using PicView.ChangeImage;
 using PicView.UILogic.Sizing;
 using System.IO;
 using System.Windows;
@@ -122,6 +123,16 @@ namespace PicView.Views.Windows
                 MinButton.TheButton.Click += delegate { SystemCommands.MinimizeWindow(this); };
 
                 TitleBar.MouseLeftButtonDown += delegate { DragMove(); };
+
+                StartButton.MouseEnter += delegate { MouseOverAnimations.ButtonMouseOverAnim(StartText); };
+                StartButton.MouseEnter += delegate { AnimationHelper.MouseEnterBgTexColor(StartBrush); };
+                StartButton.MouseLeave += delegate { MouseOverAnimations.ButtonMouseLeaveAnim(StartText); };
+                StartButton.MouseLeave += delegate { AnimationHelper.MouseLeaveBgTexColor(StartBrush); };
+
+                CencelButton.MouseEnter += delegate { MouseOverAnimations.ButtonMouseOverAnim(CencelText); };
+                CencelButton.MouseEnter += delegate { AnimationHelper.MouseEnterBgTexColor(CancelBrush); };
+                CencelButton.MouseLeave += delegate { MouseOverAnimations.ButtonMouseLeaveAnim(CencelText); };
+                CencelButton.MouseLeave += delegate { AnimationHelper.MouseLeaveBgTexColor(CancelBrush); };
             };
         }
 
@@ -145,7 +156,7 @@ namespace PicView.Views.Windows
                 {
                     var data = e.Data.GetData(DataFormats.Text);
 
-                    if (data != null) // Check if from web)
+                    if (data != null)
                     {
                         var text = data.ToString();
                         if (Directory.Exists(text))
@@ -153,10 +164,6 @@ namespace PicView.Views.Windows
                             textBox.Text = text;
                         }
                     }
-                    else
-                    {
-                        return;
-                    }
                 }
                 else if (Directory.Exists(files[0]))
                 {