From cb9e09c21ba04e3a72d7393f636287dce2a2b9d5 Mon Sep 17 00:00:00 2001 From: Saas Date: Wed, 18 Mar 2026 16:55:35 +0100 Subject: [PATCH 1/2] fix Show whole timeline button --- Source/Editor/GUI/Timeline/Timeline.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/Editor/GUI/Timeline/Timeline.cs b/Source/Editor/GUI/Timeline/Timeline.cs index 15e7eb953..1fb19e9ec 100644 --- a/Source/Editor/GUI/Timeline/Timeline.cs +++ b/Source/Editor/GUI/Timeline/Timeline.cs @@ -2148,10 +2148,9 @@ namespace FlaxEditor.GUI.Timeline /// public void ShowWholeTimeline() { - var viewWidth = Width; - var timelineWidth = Duration * UnitsPerSecond * Zoom + 8 * StartOffset; - _backgroundArea.ViewOffset = Float2.Zero; - Zoom = viewWidth / timelineWidth; + const float padding = 40f; + Zoom = (_backgroundArea.Width - padding * 2f) / (Duration * UnitsPerSecond); + _backgroundArea.ViewOffset = new Float2(-_leftEdge.X + padding, _backgroundArea.ViewOffset.Y); } /// From e5d526c9af30bfa0a0c7508de255600d48b16c33 Mon Sep 17 00:00:00 2001 From: Saas Date: Wed, 18 Mar 2026 16:55:45 +0100 Subject: [PATCH 2/2] show whole timeline when animation loads --- Source/Editor/Windows/Assets/AnimationWindow.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Editor/Windows/Assets/AnimationWindow.cs b/Source/Editor/Windows/Assets/AnimationWindow.cs index 268e18503..8dbcc5921 100644 --- a/Source/Editor/Windows/Assets/AnimationWindow.cs +++ b/Source/Editor/Windows/Assets/AnimationWindow.cs @@ -455,6 +455,7 @@ namespace FlaxEditor.Windows.Assets _timeline.Enabled = true; _timeline.SetNoTracksText(null); ClearEditedFlag(); + _timeline.ShowWholeTimeline(); } }