Browse Source

Upadted top bar of popups

flabbet 5 years ago
parent
commit
cf6106c36e

BIN
PixiEditor/Images/Cross.png


+ 0 - 1
PixiEditor/PixiEditor.csproj

@@ -53,7 +53,6 @@
     <Resource Include="Images\CircleImage.png" />
     <Resource Include="Images\ColorCircle.png" />
     <Resource Include="Images\ColorPalette.png" />
-    <Resource Include="Images\Cross.png" />
     <Resource Include="Images\EarserImage.png" />
     <Resource Include="Images\BrightnessImage.png" />
     <Resource Include="Images\LineImage.png" />

+ 4 - 7
PixiEditor/Views/ImportFilePopup.xaml

@@ -17,7 +17,7 @@
     <Border BorderBrush="Black" BorderThickness="1">
     <Grid Background="{StaticResource AccentColor}">
         <Grid.RowDefinitions>
-            <RowDefinition Height="4*"/>
+            <RowDefinition Height="32"/>
             <RowDefinition Height="67*"/>
         </Grid.RowDefinitions>
         <Grid Grid.Row="0" Background="#FF2C2C2C">
@@ -26,12 +26,9 @@
                     <i:InvokeCommandAction Command="{Binding DragMoveCommand}"/>
                 </i:EventTrigger>
             </i:Interaction.Triggers>
-            <Button Width="20" Height="20" Style="{StaticResource ImageButtonStyle}" Cursor="Hand" VerticalAlignment="Top" HorizontalAlignment="Right" BorderThickness="0" Command="{Binding CloseButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
-                <Button.Background>
-                    <ImageBrush ImageSource="/Images/Cross.png" Stretch="Uniform"/>
-                </Button.Background>
-            </Button>
-        </Grid>
+                <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource CloseButtonStyle}" WindowChrome.IsHitTestVisibleInChrome="True" ToolTip="Close"
+                            Command="{Binding CloseButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/>
+            </Grid>
         <StackPanel Grid.Row="1" >
             <Label Height="40" Width="120" VerticalAlignment="Top" Content="Open" Foreground="Snow" HorizontalContentAlignment="Center" FontSize="24" Margin="0,10,0,0"/>
                 <Button Grid.Row="1" BorderThickness="1" Foreground="Snow" Height="40" Width="160" Margin="0,30,0,0" Content="File Path" Background="#303030" BorderBrush="{Binding PathButtonBorder}" Command="{Binding ChoosePathCommand}"/>

+ 1 - 1
PixiEditor/Views/MainWindow.xaml

@@ -276,7 +276,7 @@
                                                     </i:Interaction.Triggers>
                                                     <Grid.ContextMenu>
                                                         <ContextMenu>
-                                                            <MenuItem Header="Remove" Command="{Binding RemoveSwatchCommand, Source={StaticResource ViewModelMain}}" CommandParameter="{Binding}"/>
+                                                            <MenuItem Header="Remove" Foreground="White" Command="{Binding RemoveSwatchCommand, Source={StaticResource ViewModelMain}}" CommandParameter="{Binding}"/>
                                                         </ContextMenu>
                                                     </Grid.ContextMenu>
                                                 </Grid>

+ 3 - 7
PixiEditor/Views/NewFilePopup.xaml

@@ -17,7 +17,7 @@
     <Border BorderBrush="Black" BorderThickness="1">
         <Grid Background="{StaticResource AccentColor}">
             <Grid.RowDefinitions>
-                <RowDefinition Height="25*"/>
+                <RowDefinition Height="32*"/>
                 <RowDefinition Height="577*"/>
             </Grid.RowDefinitions>
             <Grid Grid.Row="0" Background="{StaticResource MainColor}">
@@ -26,12 +26,8 @@
                         <i:InvokeCommandAction Command="{Binding DragMoveCommand}"/>
                     </i:EventTrigger>
                 </i:Interaction.Triggers>
-                <Button Width="20" Height="20" VerticalAlignment="Top" Style="{StaticResource ImageButtonStyle}" Cursor="Hand" HorizontalAlignment="Right" BorderThickness="0" Command="{Binding CloseCommand}" 
-                        CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
-                    <Button.Background>
-                        <ImageBrush ImageSource="/Images/Cross.png" Stretch="Uniform"/>
-                    </Button.Background>
-                </Button>
+                <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource CloseButtonStyle}" WindowChrome.IsHitTestVisibleInChrome="True" ToolTip="Close"
+                            Command="{Binding CloseCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/>
             </Grid>
             <Label Content="New File" Grid.Row="1" Margin="0,10,0,0" HorizontalAlignment="Center" VerticalAlignment="Top" Foreground="White" FontSize="24"/>
             <StackPanel HorizontalAlignment="Center" Margin="0,60,0,0" Background="{StaticResource MainColor}" VerticalAlignment="Top" Grid.Row="1" Width="350" Height="150">