Browse Source

Removed export warning and added file types to Save and Export menu items

Christoph Lettau 2 years ago
parent
commit
98da4ca028

+ 0 - 6
src/PixiEditor/Models/Dialogs/ExportFileDialog.cs

@@ -85,12 +85,6 @@ internal class ExportFileDialog : CustomDialog
             FileHeight = popup.SaveHeight;
             FileHeight = popup.SaveHeight;
             FilePath = popup.SavePath;
             FilePath = popup.SavePath;
 
 
-            if (ChosenFormat.ToString() != "pixi")
-            {
-                ExportWarningPopup exportWarningPopup = new ExportWarningPopup();
-                exportWarningPopup.ShowDialog();
-            }
-
             ChosenFormat = popup.SaveFormat;
             ChosenFormat = popup.SaveFormat;
         }
         }
 
 

+ 0 - 39
src/PixiEditor/Views/Dialogs/ExportWarningPopup.xaml

@@ -1,39 +0,0 @@
-<Window x:Class="PixiEditor.Views.Dialogs.ExportWarningPopup"
-        x:ClassModifier="internal"
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        xmlns:system="clr-namespace:System;assembly=System.Runtime" 
-        xmlns:behaviours="clr-namespace:PixiEditor.Helpers.Behaviours" 
-        xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
-        xmlns:dial="clr-namespace:PixiEditor.Views.Dialogs"
-        mc:Ignorable="d" WindowStyle="None"
-        d:Title="Notice" Height="225" Width="400" MinHeight="225" MinWidth="400"
-        WindowStartupLocation="CenterScreen"
-        x:Name="popup">
-
-    <WindowChrome.WindowChrome>
-        <WindowChrome CaptionHeight="32"  GlassFrameThickness="0.1"
-                      ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
-    </WindowChrome.WindowChrome>
-
-    <DockPanel Background="{StaticResource AccentColor}" Focusable="True">
-        <i:Interaction.Behaviors>
-            <behaviours:ClearFocusOnClickBehavior/>
-        </i:Interaction.Behaviors>
-
-        <dial:DialogTitleBar DockPanel.Dock="Top"
-            TitleText="What you should know about exporting" CloseCommand="{Binding DataContext.CancelCommand, ElementName=popup}" />
-
-        <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,15">
-            <Button Width="70" IsDefault="True" Click="OkButton_Close" Style="{StaticResource DarkRoundButton}" Content="Close"/>
-        </StackPanel>
-
-        <TextBlock 
-            Grid.Row="1" Text="You're about to export your project as a regular picture. Please note that this will summarize all layers into one. In order to make sure you can properly continue working on this project, click on 'File' > 'Save as...' and save it as a .pixi file." TextAlignment="Center"
-            VerticalAlignment="Center" FontSize="15" Foreground="White" Margin="20,0"
-            d:Text="You're about to export your project as a regular picture. Please note that this will summarize all layers into one. In order to make sure you can properly continue working on this project, click on 'File' > 'Save as...' and save it as a .pixi file."
-            TextWrapping="WrapWithOverflow" TextTrimming="WordEllipsis" />
-    </DockPanel>
-</Window>

+ 0 - 45
src/PixiEditor/Views/Dialogs/ExportWarningPopup.xaml.cs

@@ -1,45 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
-
-namespace PixiEditor.Views.Dialogs;
-/// <summary>
-/// Interaktionslogik für ExportWarningPopup.xaml
-/// </summary>
-internal partial class ExportWarningPopup : Window
-{
-    public static readonly DependencyProperty BodyProperty =
-        DependencyProperty.Register(nameof(Body), typeof(string), typeof(ExportWarningPopup));
-
-    public new string Title
-    {
-        get => base.Title;
-        set => base.Title = value;
-    }
-
-    public string Body
-    {
-        get => (string)GetValue(BodyProperty);
-        set => SetValue(BodyProperty, value);
-    }
-
-    public ExportWarningPopup()
-    {
-        InitializeComponent();
-    }
-
-    private void OkButton_Close(object sender, RoutedEventArgs e)
-    {
-        Close();
-    }
-}

+ 3 - 3
src/PixiEditor/Views/MainWindow.xaml

@@ -178,13 +178,13 @@
                             </MenuItem.ItemTemplate>
                             </MenuItem.ItemTemplate>
                         </MenuItem>
                         </MenuItem>
                         <MenuItem
                         <MenuItem
-                            Header="_Save"
+                            Header="_Save (.pixi)"
                             cmds:Menu.Command="PixiEditor.File.Save" />
                             cmds:Menu.Command="PixiEditor.File.Save" />
                         <MenuItem
                         <MenuItem
-                            Header="_Save As..."
+                            Header="_Save As... (.pixi)"
                             cmds:Menu.Command="PixiEditor.File.SaveAsNew" />
                             cmds:Menu.Command="PixiEditor.File.SaveAsNew" />
                         <MenuItem
                         <MenuItem
-                            Header="_Export"
+                            Header="_Export (.png, .jpeg, .gif, .bmp)"
                             cmds:Menu.Command="PixiEditor.File.Export" />
                             cmds:Menu.Command="PixiEditor.File.Export" />
                         <Separator />
                         <Separator />
                         <MenuItem
                         <MenuItem