Browse Source

Improved open animation tab and disabled loading window

flabbet 7 months ago
parent
commit
d52b420e4f

+ 1 - 1
src/PixiDocks

@@ -1 +1 @@
-Subproject commit 1bbf5698bd734cb263a364b6d08f52a9f004dec8
+Subproject commit 4f8b83c2ef77341292b92112e84b2319855b701a

+ 23 - 1
src/PixiEditor/ViewModels/Dock/LayoutManager.cs

@@ -67,6 +67,14 @@ internal class LayoutManager
                     {
                         Id = "DocumentArea", FallbackContent = new CreateDocumentFallbackView(),
                     },
+                    SplitDirection = DockingDirection.Bottom,
+                    SecondSize = 300,
+                    AutoExpand = true,
+                    Second = new DockableArea()
+                    {
+                        Id = "TimelineArea",
+                        CloseRegionOnEmpty = false
+                    }
                 },
                 SecondSize = 360,
                 SplitDirection = DockingDirection.Right,
@@ -201,7 +209,21 @@ internal class LayoutManager
         IDockable? created = TryCreateDockable(id);
         if (created != null)
         {
-            DockContext.Float(created, 0, 0);
+            bool attached = false;
+            ActiveLayout.Root.Traverse(((element, tree) =>
+            {
+                if (element is IDockableHost host && element.Id == $"{id}Area" && !attached)
+                {
+                    host.AddDockable(created);
+                    host.ActiveDockable = created;
+                    attached = true;
+                }
+            }));
+            
+            if (!attached)
+            {
+                DockContext.Float(created, 0, 0);
+            }
         }
     }
 }

+ 2 - 2
src/PixiEditor/Views/LoadingWindow.axaml.cs

@@ -15,10 +15,10 @@ public partial class LoadingWindow : Window
 
     public static void ShowInNewThread()
     {
-        var thread = new Thread(ThreadStart) { IsBackground = true };
+        /*var thread = new Thread(ThreadStart) { IsBackground = true };
 
         thread.SetApartmentState(ApartmentState.STA);
-        thread.Start();
+        thread.Start();*/
     }
 
     public void SafeClose()