Browse Source

Update startup and new file popups

Equbuxu 3 years ago
parent
commit
995c9eeb92

+ 2 - 2
PixiEditor/Views/Dialogs/HelloTherePopup.xaml

@@ -90,8 +90,8 @@
                 </StackPanel>
 
                 <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
-                    <Button Style="{StaticResource DarkRoundButton}" Command="{Binding OpenFileCommand}" Width="150" Margin="10">Open</Button>
-                    <Button Style="{StaticResource DarkRoundButton}" Command="{Binding OpenNewFileCommand}" Width="150" Margin="10">New</Button>
+                    <Button Style="{StaticResource DarkRoundButton}" Command="{Binding OpenFileCommand}" Width="150" Height="30" FontSize="18" Margin="10">Open</Button>
+                    <Button Style="{StaticResource DarkRoundButton}" Command="{Binding OpenNewFileCommand}" Width="150" Height="30" FontSize="18" Margin="10">New</Button>
                 </StackPanel>
 
                 <StackPanel Grid.Row="2" HorizontalAlignment="Center" Margin="0,30,0,0">

+ 21 - 11
PixiEditor/Views/Dialogs/NewFilePopup.xaml

@@ -7,8 +7,13 @@
         xmlns:vm="clr-namespace:PixiEditor.ViewModels"
         xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:behaviors="clr-namespace:PixiEditor.Helpers.Behaviours"
         mc:Ignorable="d"
-        d:DesignHeight="600" ShowInTaskbar="False" d:DesignWidth="450"
-        DataContext="{DynamicResource NewFileMenuViewModel}" WindowStyle="None" WindowStartupLocation="CenterScreen" MinHeight="300" MinWidth="400" Height="600" Width="450" Name="newFilePopup" BorderBrush="Black" BorderThickness="1">
+        ShowInTaskbar="False"
+        DataContext="{DynamicResource NewFileMenuViewModel}" 
+        WindowStyle="None" 
+        WindowStartupLocation="CenterScreen" 
+        MinHeight="200" MinWidth="300" Height="255" Width="300" 
+        Name="newFilePopup" 
+        BorderBrush="Black" BorderThickness="1">
     <Window.Resources>
         <vm:NewFileMenuViewModel x:Key="NewFileMenuViewModel" />
     </Window.Resources>
@@ -31,23 +36,28 @@
             <behaviors:ClearFocusOnClickBehavior/>
         </i:Interaction.Behaviors>
 
-        <DockPanel Grid.Row="0" Background="{StaticResource MainColor}">
-            <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource CloseButtonStyle}"
+        <Grid Grid.Row="0" Background="{StaticResource MainColor}">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition/>
+                <ColumnDefinition/>
+            </Grid.ColumnDefinitions>
+            <TextBlock TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="15" Margin="5,0,0,0" Grid.Column="0" Grid.ColumnSpan="2">
+                Create a new canvas
+            </TextBlock>
+            <Button Grid.Column="1" HorizontalAlignment="Right" Style="{StaticResource CloseButtonStyle}"
                     WindowChrome.IsHitTestVisibleInChrome="True" ToolTip="Close"
                     Command="{x:Static SystemCommands.CloseWindowCommand}" />
-        </DockPanel>
-        <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">
+        </Grid>
+        <StackPanel HorizontalAlignment="Center" Margin="0,30,0,0" Background="{StaticResource MainColor}"
+                        VerticalAlignment="Top" Grid.Row="1" Width="230" Height="125">
             <local:SizePicker Margin="0,20" HorizontalAlignment="Center" Height="110"
                               PreserveAspectRatio="False"
                               ChosenHeight="{Binding FileHeight, Mode=TwoWay, ElementName=newFilePopup}"
                               ChosenWidth="{Binding FileWidth, Mode=TwoWay, ElementName=newFilePopup}" 
                               x:Name="sizePicker"/>
         </StackPanel>
-        <Button VerticalAlignment="Bottom" HorizontalAlignment="Right" FontSize="20" Height="30" Width="120"
-                Style="{StaticResource DarkRoundButton}" Content="Create" Margin="0,0,10,10" Grid.Row="1"
+        <Button VerticalAlignment="Bottom" HorizontalAlignment="Center" Height="28" Width="70"
+                Style="{StaticResource DarkRoundButton}" Content="Create" Margin="16" Grid.Row="1"
                 Command="{Binding OkCommand}" IsDefault="True"
                 CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" 
                 x:Name="createButton"/>

+ 2 - 2
PixiEditor/Views/Dialogs/ResizeCanvasPopup.xaml

@@ -37,7 +37,7 @@
             <Button Grid.Column="1" HorizontalAlignment="Right" Style="{StaticResource CloseButtonStyle}"
                     WindowChrome.IsHitTestVisibleInChrome="True" ToolTip="Close"
                     Command="{x:Static SystemCommands.CloseWindowCommand}" />
-            <TextBlock TextAlignment="Center" HorizontalAlignment="Stretch" VerticalAlignment="Center" Foreground="White" FontSize="15" Margin="5,0,0,0" Grid.Column="0" Grid.ColumnSpan="2">
+            <TextBlock TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="15" Margin="5,0,0,0" Grid.Column="0" Grid.ColumnSpan="2">
                 Resize Canvas
             </TextBlock>
         </Grid>
@@ -59,6 +59,6 @@
             </DockPanel>
         </StackPanel>
         <Button Grid.Row="1" Height="28" Width="70" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="16"
-                Style="{StaticResource DarkRoundButton}" Content="OK" Click="Button_Click" IsDefault="True" />
+                Style="{StaticResource DarkRoundButton}" Content="Resize" Click="Button_Click" IsDefault="True" />
     </Grid>
 </Window>