Browse Source

Fixed hello there squishing

flabbet 10 months ago
parent
commit
4305065a6e

+ 0 - 28
src/PixiEditor/ViewModels/Tools/Tools/MoveToolViewModel.cs

@@ -97,32 +97,4 @@ internal class MoveToolViewModel : ToolViewModel, IMoveToolHandler
         OnDeselecting();
         OnDeselecting();
         OnSelected();
         OnSelected();
     }
     }
-
-    private static RectI? GetSelectedLayersBounds()
-    {
-        var layers = ViewModelMain.Current.DocumentManagerSubViewModel.ActiveDocument?.ExtractSelectedLayers();
-        RectI? bounds = null;
-        if (layers != null)
-        {
-            foreach (var layer in layers)
-            {
-                var foundLayer =
-                    ViewModelMain.Current.DocumentManagerSubViewModel.ActiveDocument.StructureHelper.Find(layer);
-                RectI? layerBounds = (RectI?)foundLayer?.TightBounds;
-                if (layerBounds != null)
-                {
-                    if (bounds == null)
-                    {
-                        bounds = layerBounds;
-                    }
-                    else
-                    {
-                        bounds = bounds.Value.Union(layerBounds.Value);
-                    }
-                }
-            }
-        }
-
-        return bounds;
-    }
 }
 }

+ 1 - 1
src/PixiEditor/Views/Windows/HelloTherePopup.axaml

@@ -18,7 +18,7 @@
                          xmlns:ui1="clr-namespace:PixiEditor.Helpers.UI"
                          xmlns:ui1="clr-namespace:PixiEditor.Helpers.UI"
                          xmlns:windows="clr-namespace:PixiEditor.Views.Windows"
                          xmlns:windows="clr-namespace:PixiEditor.Views.Windows"
                          mc:Ignorable="d"
                          mc:Ignorable="d"
-                         Title="Hello there!" Height="662" Width="982" MinHeight="500" MinWidth="500"
+                         Title="Hello there!" Height="680" Width="982" MinHeight="500" MinWidth="600"
                          Loaded="HelloTherePopup_OnLoaded">
                          Loaded="HelloTherePopup_OnLoaded">
 
 
     <Window.Styles>
     <Window.Styles>

+ 6 - 4
src/PixiEditor/Views/Windows/HelloTherePopup.axaml.cs

@@ -154,18 +154,18 @@ internal partial class HelloTherePopup : PixiEditorPopup
 
 
         if (RecentlyOpenedEmpty)
         if (RecentlyOpenedEmpty)
         {
         {
-            Width = 500 + newsWidth;
-            Height = 670;
+            Width = 550 + newsWidth;
+            Height = 680;
         }
         }
         else if (RecentlyOpened.Count < 4)
         else if (RecentlyOpened.Count < 4)
         {
         {
             Width = 545 + newsWidth;
             Width = 545 + newsWidth;
-            Height = 670;
+            Height = 680;
         }
         }
         else if (RecentlyOpened.Count < 7)
         else if (RecentlyOpened.Count < 7)
         {
         {
             Width = 575 + newsWidth;
             Width = 575 + newsWidth;
-            Height = 840;
+            Height = 850;
         }
         }
     }
     }
 
 
@@ -184,10 +184,12 @@ internal partial class HelloTherePopup : PixiEditorPopup
         if (e.NewValue.Value)
         if (e.NewValue.Value)
         {
         {
             helloTherePopup.grid.ColumnDefinitions.Last<ColumnDefinition>().Width = new GridLength(0);
             helloTherePopup.grid.ColumnDefinitions.Last<ColumnDefinition>().Width = new GridLength(0);
+            helloTherePopup.Width -= 300;
         }
         }
         else
         else
         {
         {
             helloTherePopup.grid.ColumnDefinitions.Last<ColumnDefinition>().Width = new GridLength(300);
             helloTherePopup.grid.ColumnDefinitions.Last<ColumnDefinition>().Width = new GridLength(300);
+            helloTherePopup.Width += 300;
         }
         }
 
 
         PixiEditorSettings.StartupWindow.NewsPanelCollapsed.Value = e.NewValue.Value;
         PixiEditorSettings.StartupWindow.NewsPanelCollapsed.Value = e.NewValue.Value;