Browse Source

Updated dialogs

CPKreuz 3 years ago
parent
commit
68240a2ca8

+ 26 - 17
PixiEditor/Views/Dialogs/CrashReportDialog.xaml

@@ -8,10 +8,10 @@
         d:DataContext="{d:DesignInstance vm:CrashReportViewModel}"
         d:DataContext="{d:DesignInstance vm:CrashReportViewModel}"
         mc:Ignorable="d"
         mc:Ignorable="d"
         Background="{StaticResource AccentColor}" Foreground="White"
         Background="{StaticResource AccentColor}" Foreground="White"
-        Title="Oh no!" WindowStyle="None"
+        Title="PixiEditor has crashed!" WindowStyle="None"
         MinWidth="450" MinHeight="195"
         MinWidth="450" MinHeight="195"
-        Width="450" Height="195">
-    
+        Width="480" Height="180">
+
     <WindowChrome.WindowChrome>
     <WindowChrome.WindowChrome>
         <WindowChrome CaptionHeight="35"  GlassFrameThickness="0.1"
         <WindowChrome CaptionHeight="35"  GlassFrameThickness="0.1"
                       ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}"/>
                       ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}"/>
@@ -22,25 +22,34 @@
                         Executed="CommandBinding_Executed_Close" />
                         Executed="CommandBinding_Executed_Close" />
     </Window.CommandBindings>
     </Window.CommandBindings>
 
 
-    <StackPanel>
-        <dial:DialogTitleBar TitleText="Oh no!" CloseCommand="{x:Static SystemCommands.CloseWindowCommand}" />
-        <StackPanel Grid.Row="1" Margin="5" VerticalAlignment="Center">
-            <TextBlock>PixiEditor has crashed!</TextBlock>
-            <TextBlock Text="{Binding DocumentCount, StringFormat={}{0} file(s) can be recovered}"
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition/>
+        </Grid.RowDefinitions>
+        <dial:DialogTitleBar TitleText="PixiEditor has crashed!" CloseCommand="{x:Static SystemCommands.CloseWindowCommand}" />
+        <Grid Grid.Row="1" Margin="30,30,30,0" >
+            <StackPanel>
+                <Grid Background="{StaticResource MainColor}">
+                    <StackPanel Margin="7" VerticalAlignment="Center">
+                        <TextBlock Text="{Binding DocumentCount, StringFormat={}{0} file(s) can be recovered}"
                        d:Text="2 file(s) can be recovered"/>
                        d:Text="2 file(s) can be recovered"/>
-            <TextBlock TextWrapping="Wrap">You can help the developers fixing this bug by sending a crash report that was generated</TextBlock>
+                        <TextBlock TextWrapping="Wrap">You can help the developers fixing this bug by sending a crash report that was generated</TextBlock>
+                    </StackPanel>
+                </Grid>
 
 
-            <StackPanel Margin="0,20,0,5" Orientation="Horizontal" HorizontalAlignment="Center">
-                <Button Margin="0,0,5,0" Command="{Binding OpenSendCrashReportCommand}"
+                <WrapPanel Margin="0,20,0,5" Orientation="Horizontal" HorizontalAlignment="Center">
+                    <Button Command="{Binding OpenSendCrashReportCommand}"
                         Width="120"
                         Width="120"
                         Style="{StaticResource DarkRoundButton}">Send report</Button>
                         Style="{StaticResource DarkRoundButton}">Send report</Button>
-                <Button Grid.Column="1" Margin="5,0,0,0" Width="120"
+                    <Button Margin="5,0,5,0" Width="120"
                         Command="{Binding RecoverDocumentsCommand}"
                         Command="{Binding RecoverDocumentsCommand}"
                         Style="{StaticResource DarkRoundButton}">Recover files</Button>
                         Style="{StaticResource DarkRoundButton}">Recover files</Button>
-            </StackPanel>
-            <Button Visibility="{Binding IsDebugBuild, Converter={BoolToVisibilityConverter}}"
-                    Style="{StaticResource DarkRoundButton}" Width="250"
+                    <Button Visibility="{Binding IsDebugBuild, Converter={BoolToVisibilityConverter}}"
+                    Style="{StaticResource DarkRoundButton}" Width="170"
                     Command="{Binding AttachDebuggerCommand}">(Re)Attach debugger</Button>
                     Command="{Binding AttachDebuggerCommand}">(Re)Attach debugger</Button>
-        </StackPanel>
-    </StackPanel>
+                </WrapPanel>
+            </StackPanel>
+        </Grid>
+    </Grid>
 </Window>
 </Window>

+ 4 - 2
PixiEditor/Views/Dialogs/SendCrashReportWindow.xaml

@@ -8,7 +8,7 @@
         Background="{StaticResource AccentColor}" Foreground="White"
         Background="{StaticResource AccentColor}" Foreground="White"
         Title="Send crash report"
         Title="Send crash report"
         WindowStyle="None"
         WindowStyle="None"
-        Height="150" Width="340">
+        Height="170" Width="340">
     <Window.Resources>
     <Window.Resources>
         <Style TargetType="TextBlock">
         <Style TargetType="TextBlock">
             <Setter Property="HorizontalAlignment" Value="Center"/>
             <Setter Property="HorizontalAlignment" Value="Center"/>
@@ -26,7 +26,7 @@
 
 
     <StackPanel>
     <StackPanel>
         <dial:DialogTitleBar TitleText="Send crash report" CloseCommand="{x:Static SystemCommands.CloseWindowCommand}" />
         <dial:DialogTitleBar TitleText="Send crash report" CloseCommand="{x:Static SystemCommands.CloseWindowCommand}" />
-        <StackPanel Margin="5">
+        <StackPanel Margin="10">
             <TextBlock>You can find the report here:</TextBlock>
             <TextBlock>You can find the report here:</TextBlock>
             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                 <Button Width="140" Click="CopyToClipboard">Copy to clipboard</Button>
                 <Button Width="140" Click="CopyToClipboard">Copy to clipboard</Button>
@@ -38,6 +38,8 @@
                 <Button Click="OpenHyperlink" Tag="">Discord</Button>
                 <Button Click="OpenHyperlink" Tag="">Discord</Button>
                 <Button Click="OpenHyperlink" Tag="">E-Mail</Button>
                 <Button Click="OpenHyperlink" Tag="">E-Mail</Button>
             </StackPanel>
             </StackPanel>
+            <TextBlock TextAlignment="Center" FontSize="8"
+                       TextWrapping="Wrap" Foreground="#DDD">The report contains all documents that were opened when the crash happenend</TextBlock>
         </StackPanel>
         </StackPanel>
     </StackPanel>
     </StackPanel>
 </Window>
 </Window>

+ 1 - 0
PixiEditor/Views/Dialogs/SendCrashReportWindow.xaml.cs

@@ -43,6 +43,7 @@ namespace PixiEditor.Views.Dialogs
         {
         {
             var button = sender as Button;
             var button = sender as Button;
 
 
+            CopyToClipboard(null, null);
             ProcessHelpers.ShellExecute(button.Tag as string);
             ProcessHelpers.ShellExecute(button.Tag as string);
         }
         }
     }
     }