Browse Source

Revert "Git fix?"

This reverts commit 96427f4aebb1073efe0019e70f0a78c11c51616f.
flabbet 3 years ago
parent
commit
681d06f4c7

BIN
PixiEditor/Images/Processing.gif


+ 0 - 3
PixiEditor/PixiEditor.csproj

@@ -152,7 +152,6 @@
 		<None Remove="Images\PixiEditorLogo.png" />
 		<None Remove="Images\PixiParserLogo.png" />
 		<None Remove="Images\Placeholder.png" />
-		<None Remove="Images\Processing.gif" />
 		<None Remove="Images\SelectImage.png" />
 		<None Remove="Images\SocialMedia\DiscordIcon.png" />
 		<None Remove="Images\SocialMedia\DonateIcon.png" />
@@ -203,7 +202,6 @@
 		<PackageReference Include="PixiEditor.Parser.Skia" Version="2.0.0" />
 		<PackageReference Include="SkiaSharp" Version="2.80.3" />
 		<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
-		<PackageReference Include="WpfAnimatedGif" Version="2.0.2" />
 		<PackageReference Include="WriteableBitmapEx">
 			<Version>1.6.8</Version>
 		</PackageReference>
@@ -226,7 +224,6 @@
 		<Resource Include="Images\PixiEditorLogo.png" />
 		<Resource Include="Images\PixiParserLogo.png" />
 		<Resource Include="Images\Placeholder.png" />
-		<Resource Include="Images\Processing.gif" />
 		<Resource Include="Images\SocialMedia\DiscordIcon.png" />
 		<Resource Include="Images\SocialMedia\DonateIcon.png" />
 		<Resource Include="Images\SocialMedia\GitHubIcon.png" />

+ 2 - 2
PixiEditor/Properties/AssemblyInfo.cs

@@ -50,5 +50,5 @@ using System.Windows;
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.1.7.1")]
-[assembly: AssemblyFileVersion("0.1.7.1")]
+[assembly: AssemblyVersion("0.1.7.0")]
+[assembly: AssemblyFileVersion("0.1.7.0")]

+ 1 - 5
PixiEditor/Views/Dialogs/LospecPalettesBrowser.xaml

@@ -5,7 +5,6 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:PixiEditor.Views.UserControls.Lospec" xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters"
              mc:Ignorable="d" 
-             xmlns:gif="http://wpfanimatedgif.codeplex.com"
              Title="Palettes Browser" WindowStartupLocation="CenterScreen" MinWidth="200" Height="600" Width="800" WindowStyle="None"
              Name="lospecPalettesBrowser">
     <Window.Resources>
@@ -36,10 +35,7 @@
             <TextBlock Text="Couldn't fetch palettes" Foreground="White" FontSize="20" HorizontalAlignment="Center" 
                        VerticalAlignment="Center" Visibility="{Binding ElementName=itemsControl, 
                 Path=Visibility, Converter={converters:OppositeVisibilityConverter}}"/>
-            <Image gif:ImageBehavior.AnimatedSource="/Images/Processing.gif" HorizontalAlignment="Center" VerticalAlignment="Center"
-                   Visibility="{Binding ElementName=lospecPalettesBrowser, Path=IsFetching, Converter={StaticResource BoolToVisibilityConverter}}"
-                   Height="50" gif:ImageBehavior.AnimationSpeedRatio="1.5"/>
-            <ScrollViewer Margin="5" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" ScrollChanged="ScrollViewer_ScrollChanged">
+            <ScrollViewer Margin="5" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                 <ItemsControl Name="itemsControl" ItemsSource="{Binding ElementName=lospecPalettesBrowser, Path=PaletteList.Palettes}" 
                           Visibility="{Binding ElementName=lospecPalettesBrowser, Path=PaletteList.FetchedCorrectly,
                 Converter={StaticResource BoolToVisibilityConverter}}">

+ 1 - 31
PixiEditor/Views/Dialogs/LospecPalettesBrowser.xaml.cs

@@ -25,8 +25,6 @@ namespace PixiEditor.Views.Dialogs
     public partial class LospecPalettesBrowser : Window
     {
         public event ListFetched OnListFetched;
-        private int _currentPage = 0;
-
         public PaletteList PaletteList
         {
             get { return (PaletteList)GetValue(PaletteListProperty); }
@@ -47,17 +45,6 @@ namespace PixiEditor.Views.Dialogs
         public static readonly DependencyProperty ImportPaletteCommandProperty =
             DependencyProperty.Register("ImportPaletteCommand", typeof(ICommand), typeof(LospecPalettesBrowser));
 
-        public bool IsFetching
-        {
-            get { return (bool)GetValue(IsFetchingProperty); }
-            set { SetValue(IsFetchingProperty, value); }
-        }
-
-        // Using a DependencyProperty as the backing store for IsFetching.  This enables animation, styling, binding, etc...
-        public static readonly DependencyProperty IsFetchingProperty =
-            DependencyProperty.Register("IsFetching", typeof(bool), typeof(LospecPalettesBrowser), new PropertyMetadata(false));
-
-
         private void CommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e)
         {
             e.CanExecute = true;
@@ -74,30 +61,13 @@ namespace PixiEditor.Views.Dialogs
             InitializeComponent();
         }
 
-        public async Task FetchPalettes()
+        public async void FetchPalettes()
         {
-            IsFetching = true;
             if (PaletteList == null)
             {
                 PaletteList = await LospecPaletteFetcher.FetchPage(0);
                 OnListFetched.Invoke(PaletteList);
             }
-
-            IsFetching = false;
-        }
-
-        private async void ScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e)
-        {
-            if (PaletteList == null) return;
-            var scrollViewer = (ScrollViewer)sender;
-            if (scrollViewer.VerticalOffset == scrollViewer.ScrollableHeight)
-            {
-                _currentPage++;
-                var newPalettes = await LospecPaletteFetcher.FetchPage(_currentPage);
-                PaletteList.Palettes.AddRange(newPalettes.Palettes);
-                PaletteList = PaletteList;
-                OnListFetched.Invoke(PaletteList);
-            }
         }
     }
 }

+ 1 - 2
PixiEditor/Views/MainWindow.xaml

@@ -343,8 +343,7 @@
                                     <avalondock:LayoutAnchorable ContentId="palette" Title="Palette" CanHide="False"
                                                                  CanClose="False" CanAutoHide="False"
                                                                  CanDockAsTabbedDocument="False" CanFloat="True">
-                                        <usercontrols:PaletteViewer IsEnabled="{Binding DocumentSubViewModel.Owner.BitmapManager.ActiveDocument,
-                                        Converter={converters:NotNullToBoolConverter}}" Colors="{Binding BitmapManager.ActiveDocument.Palette}"
+                                        <usercontrols:PaletteViewer Colors="{Binding BitmapManager.ActiveDocument.Palette}"
                                                               SelectColorCommand="{Binding ColorsSubViewModel.SelectColorCommand}"
                                                                     ImportPaletteCommand="{Binding ColorsSubViewModel.ImportPaletteCommand}"/>
                                     </avalondock:LayoutAnchorable>

+ 1 - 1
PixiEditor/Views/UserControls/PaletteViewer.xaml

@@ -19,7 +19,7 @@
             <DockPanel VerticalAlignment="Center" Margin="0 5 0 0">
                 <local:PaletteColorAdder DockPanel.Dock="Left" Margin="5 0 0 0" Colors="{Binding ElementName=paletteControl, Path=Colors}"/>
                 <StackPanel Margin="0, 0, 5, 0" HorizontalAlignment="Right" Width="85" VerticalAlignment="Center" Orientation="Horizontal">
-                <Button Margin="0, 0, 5, 0" Style="{StaticResource ToolButtonStyle}" Click="BrowsePalettes_Click"
+                <Button Margin="0, 0, 5, 0" Style="{StaticResource ToolButtonStyle}" Click="BrowsePalettes_Click" 
                 Cursor="Hand" Height="24" Width="24" ToolTip="Browse Palettes">
                         <Button.Background>
                             <ImageBrush ImageSource="/Images/Globe.png"/>

+ 1 - 1
PixiEditor/Views/UserControls/PaletteViewer.xaml.cs

@@ -181,7 +181,7 @@ namespace PixiEditor.Views.UserControls
             };
 
             browser.Show();
-            await browser.FetchPalettes();
+            browser.FetchPalettes();
         }
     }
 }