Browse Source

Move button height into style

Equbuxu 3 years ago
parent
commit
439dab83ad

+ 1 - 1
PixiEditor/Exceptions/CorruptedFileException.cs

@@ -6,7 +6,7 @@ namespace PixiEditor.Exceptions
     public class CorruptedFileException : Exception
     {
         public CorruptedFileException()
-            : base("Selected file is invalid or corrupted.")
+            : base("The file you chose might be corrupted.")
         {
         }
 

+ 1 - 0
PixiEditor/Styles/ThemeStyle.xaml

@@ -41,6 +41,7 @@
     <Style TargetType="Button" x:Key="DarkRoundButton" BasedOn="{StaticResource BaseDarkButton}">
         <Setter Property="OverridesDefaultStyle" Value="True" />
         <Setter Property="Background" Value="#303030" />
+        <Setter Property="Height" Value="28"/>
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="Button">

+ 3 - 3
PixiEditor/Views/Dialogs/ConfirmationPopup.xaml

@@ -24,21 +24,21 @@
 
         <StackPanel DockPanel.Dock="Bottom" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center"
                     Margin="0,0,10,16">
-            <Button Margin="10,0,10,0" Height="28" Width="60" IsDefault="True"
+            <Button Margin="10,0,10,0" Width="60" IsDefault="True"
                     Command="{Binding Path=DataContext.SetResultAndCloseCommand, ElementName=popup}"
                     Style="{StaticResource DarkRoundButton}" Content="Yes">
                 <Button.CommandParameter>
                     <system:Boolean>True</system:Boolean>
                 </Button.CommandParameter>
             </Button>
-            <Button Height="28" Width="60"
+            <Button Width="60"
                     Command="{Binding Path=DataContext.SetResultAndCloseCommand, ElementName=popup}"
                     Style="{StaticResource DarkRoundButton}" Content="No">
                 <Button.CommandParameter>
                     <system:Boolean>False</system:Boolean>
                 </Button.CommandParameter>
             </Button>
-            <Button Margin="10,0,10,0" Height="28" Width="80" Style="{StaticResource DarkRoundButton}" Content="Cancel"
+            <Button Margin="10,0,10,0" Width="80" Style="{StaticResource DarkRoundButton}" Content="Cancel"
                     Command="{Binding DataContext.CancelCommand, ElementName=popup}" />
         </StackPanel>
 

+ 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" Height="28" FontSize="15" Margin="10">Open</Button>
-                    <Button Style="{StaticResource DarkRoundButton}" Command="{Binding OpenNewFileCommand}" Width="150" Height="28" FontSize="15" Margin="10">New</Button>
+                    <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>
                 </StackPanel>
 
                 <StackPanel Grid.Row="2" HorizontalAlignment="Center" Margin="0,30,0,0">

+ 1 - 1
PixiEditor/Views/Dialogs/NewFilePopup.xaml

@@ -36,7 +36,7 @@
         <dial:DialogTitleBar DockPanel.Dock="Top"
             TitleText="Create a new canvas" CloseCommand="{x:Static SystemCommands.CloseWindowCommand}" />
 
-        <Button DockPanel.Dock="Bottom" Height="28" Width="70" Margin="16" HorizontalAlignment="Center"
+        <Button DockPanel.Dock="Bottom" Width="70" Margin="16" HorizontalAlignment="Center"
                 IsDefault="True" Content="Create" x:Name="createButton"
                 Style="{StaticResource DarkRoundButton}" 
                 Command="{Binding OkCommand}"

+ 1 - 4
PixiEditor/Views/Dialogs/NoticePopup.xaml

@@ -25,10 +25,7 @@
             TitleText="{Binding ElementName=popup, Path=Title}" CloseCommand="{Binding DataContext.CancelCommand, ElementName=popup}" />
 
         <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,16">
-            <Button Height="28" Width="70" IsDefault="True"
-                    Click="OkButton_Close"
-                    Style="{StaticResource DarkRoundButton}" Content="Close">
-            </Button>
+            <Button Width="70" IsDefault="True" Click="OkButton_Close" Style="{StaticResource DarkRoundButton}" Content="Close"/>
         </StackPanel>
 
         <TextBlock 

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

@@ -29,7 +29,7 @@
         <dial:DialogTitleBar DockPanel.Dock="Top"
             TitleText="Resize Canvas" CloseCommand="{x:Static SystemCommands.CloseWindowCommand}" />
 
-        <Button DockPanel.Dock="Bottom" Height="28" Width="70" HorizontalAlignment="Center" Margin="16"
+        <Button DockPanel.Dock="Bottom" Width="70" HorizontalAlignment="Center" Margin="16"
                 Style="{StaticResource DarkRoundButton}" Content="Resize" Click="Button_Click" IsDefault="True" />
 
         <StackPanel HorizontalAlignment="Center" Margin="0,30,0,0" Background="{StaticResource MainColor}"