From 685b19a5714435b3a9f9f3442504b74002a65122 Mon Sep 17 00:00:00 2001
From: Dean Herbert <pe@ppy.sh>
Date: Fri, 12 Jul 2024 13:57:36 +0900
Subject: [PATCH] Adjust various visuals of summary timeline in a hope for user
 acceptance

.. with a somewhat appealing design.
---
 .../Timelines/Summary/Parts/BreakPart.cs      |  2 +-
 .../Parts/ControlPointVisualisation.cs        |  4 +-
 .../Summary/Parts/EffectPointVisualisation.cs |  6 +--
 .../Summary/Parts/GroupVisualisation.cs       |  5 ++-
 .../Summary/Parts/PreviewTimePart.cs          |  2 +-
 .../Timelines/Summary/SummaryTimeline.cs      | 42 +++++++++----------
 .../Visualisations/PointVisualisation.cs      |  5 ++-
 7 files changed, 36 insertions(+), 30 deletions(-)

diff --git a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/BreakPart.cs b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/BreakPart.cs
index 100f37fd27..ef1a825969 100644
--- a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/BreakPart.cs
+++ b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/BreakPart.cs
@@ -64,7 +64,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
                 RelativeSizeAxes = Axes.Both;
 
                 InternalChild = new Circle { RelativeSizeAxes = Axes.Both };
-                Colour = colours.Gray7;
+                Colour = colours.Gray6;
             }
         }
     }
diff --git a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/ControlPointVisualisation.cs b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/ControlPointVisualisation.cs
index 47169481e2..1df128461e 100644
--- a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/ControlPointVisualisation.cs
+++ b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/ControlPointVisualisation.cs
@@ -2,6 +2,7 @@
 // See the LICENCE file in the repository root for full licence text.
 
 using osu.Framework.Allocation;
+using osu.Framework.Graphics;
 using osu.Game.Beatmaps.ControlPoints;
 using osu.Game.Graphics;
 using osu.Game.Screens.Edit.Components.Timelines.Summary.Visualisations;
@@ -15,7 +16,8 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
         public ControlPointVisualisation(ControlPoint point)
         {
             Point = point;
-            Width = 2;
+            Alpha = 0.3f;
+            Blending = BlendingParameters.Additive;
         }
 
         [BackgroundDependencyLoader]
diff --git a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/EffectPointVisualisation.cs b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/EffectPointVisualisation.cs
index a3885bc2cc..41f4b3a365 100644
--- a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/EffectPointVisualisation.cs
+++ b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/EffectPointVisualisation.cs
@@ -3,7 +3,6 @@
 
 using osu.Framework.Allocation;
 using osu.Framework.Bindables;
-using osu.Framework.Extensions.Color4Extensions;
 using osu.Framework.Graphics;
 using osu.Framework.Graphics.Containers;
 using osu.Framework.Graphics.Shapes;
@@ -96,10 +95,9 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
                     RelativeSizeAxes = Axes.Both,
                     Anchor = Anchor.BottomLeft,
                     Origin = Anchor.CentreLeft,
-                    Width = 1,
-                    Height = 0.75f,
+                    Height = 0.4f,
                     Depth = float.MaxValue,
-                    Colour = effect.GetRepresentingColour(colours).Darken(0.5f),
+                    Colour = effect.GetRepresentingColour(colours),
                 });
             }
         }
diff --git a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/GroupVisualisation.cs b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/GroupVisualisation.cs
index 2c806be162..e01900b129 100644
--- a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/GroupVisualisation.cs
+++ b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/GroupVisualisation.cs
@@ -39,7 +39,10 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
                     switch (point)
                     {
                         case TimingControlPoint:
-                            AddInternal(new ControlPointVisualisation(point));
+                            AddInternal(new ControlPointVisualisation(point)
+                            {
+                                Y = -0.4f,
+                            });
                             break;
 
                         case EffectControlPoint effect:
diff --git a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/PreviewTimePart.cs b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/PreviewTimePart.cs
index 407173034e..3a63d1e9b3 100644
--- a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/PreviewTimePart.cs
+++ b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/PreviewTimePart.cs
@@ -32,7 +32,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
             public PreviewTimeVisualisation(double time)
                 : base(time)
             {
-                Width = 2;
+                Alpha = 0.8f;
             }
 
             [BackgroundDependencyLoader]
diff --git a/osu.Game/Screens/Edit/Components/Timelines/Summary/SummaryTimeline.cs b/osu.Game/Screens/Edit/Components/Timelines/Summary/SummaryTimeline.cs
index 92012936bc..49110ccee3 100644
--- a/osu.Game/Screens/Edit/Components/Timelines/Summary/SummaryTimeline.cs
+++ b/osu.Game/Screens/Edit/Components/Timelines/Summary/SummaryTimeline.cs
@@ -23,27 +23,6 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
 
             Children = new Drawable[]
             {
-                new ControlPointPart
-                {
-                    Anchor = Anchor.Centre,
-                    Origin = Anchor.BottomCentre,
-                    RelativeSizeAxes = Axes.Both,
-                    Height = 0.35f
-                },
-                new BookmarkPart
-                {
-                    Anchor = Anchor.Centre,
-                    Origin = Anchor.TopCentre,
-                    RelativeSizeAxes = Axes.Both,
-                    Height = 0.35f
-                },
-                new PreviewTimePart
-                {
-                    Anchor = Anchor.Centre,
-                    Origin = Anchor.TopCentre,
-                    RelativeSizeAxes = Axes.Both,
-                    Height = 0.35f
-                },
                 new Container
                 {
                     Name = "centre line",
@@ -73,6 +52,27 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
                         },
                     }
                 },
+                new PreviewTimePart
+                {
+                    Anchor = Anchor.Centre,
+                    Origin = Anchor.TopCentre,
+                    RelativeSizeAxes = Axes.Both,
+                    Height = 0.4f,
+                },
+                new ControlPointPart
+                {
+                    Anchor = Anchor.Centre,
+                    Origin = Anchor.BottomCentre,
+                    RelativeSizeAxes = Axes.Both,
+                    Height = 0.4f
+                },
+                new BookmarkPart
+                {
+                    Anchor = Anchor.Centre,
+                    Origin = Anchor.TopCentre,
+                    RelativeSizeAxes = Axes.Both,
+                    Height = 0.35f
+                },
                 new BreakPart
                 {
                     Anchor = Anchor.Centre,
diff --git a/osu.Game/Screens/Edit/Components/Timelines/Summary/Visualisations/PointVisualisation.cs b/osu.Game/Screens/Edit/Components/Timelines/Summary/Visualisations/PointVisualisation.cs
index 3f0c125ada..571494860f 100644
--- a/osu.Game/Screens/Edit/Components/Timelines/Summary/Visualisations/PointVisualisation.cs
+++ b/osu.Game/Screens/Edit/Components/Timelines/Summary/Visualisations/PointVisualisation.cs
@@ -11,12 +11,15 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Visualisations
     /// </summary>
     public partial class PointVisualisation : Circle
     {
+        public readonly double StartTime;
+
         public const float MAX_WIDTH = 4;
 
         public PointVisualisation(double startTime)
             : this()
         {
             X = (float)startTime;
+            StartTime = startTime;
         }
 
         public PointVisualisation()
@@ -28,7 +31,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Visualisations
             Origin = Anchor.Centre;
 
             Width = MAX_WIDTH;
-            Height = 0.75f;
+            Height = 0.4f;
         }
     }
 }