From f489dbd7a9c1a3baea4063cc79e2cc6fc7edc0db Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 21 Jul 2023 14:39:15 +0900 Subject: [PATCH] Reduce width of right toolbar ever so slightly (and use more shared constants) --- osu.Game/Rulesets/Edit/HitObjectComposer.cs | 2 +- osu.Game/Screens/Edit/BottomBar.cs | 4 ++-- .../Edit/Compose/Components/Timeline/TimelineArea.cs | 9 ++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/osu.Game/Rulesets/Edit/HitObjectComposer.cs b/osu.Game/Rulesets/Edit/HitObjectComposer.cs index 6fcb8f62ee..d379242e3b 100644 --- a/osu.Game/Rulesets/Edit/HitObjectComposer.cs +++ b/osu.Game/Rulesets/Edit/HitObjectComposer.cs @@ -472,7 +472,7 @@ namespace osu.Game.Rulesets.Edit public abstract partial class HitObjectComposer : CompositeDrawable, IPositionSnapProvider { public const float TOOLBOX_CONTRACTED_SIZE_LEFT = 60; - public const float TOOLBOX_CONTRACTED_SIZE_RIGHT = 130; + public const float TOOLBOX_CONTRACTED_SIZE_RIGHT = 120; public readonly Ruleset Ruleset; diff --git a/osu.Game/Screens/Edit/BottomBar.cs b/osu.Game/Screens/Edit/BottomBar.cs index 9a32d5d968..aa3c4ba0d0 100644 --- a/osu.Game/Screens/Edit/BottomBar.cs +++ b/osu.Game/Screens/Edit/BottomBar.cs @@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Effects; using osu.Framework.Graphics.Shapes; using osu.Game.Overlays; +using osu.Game.Rulesets.Edit; using osu.Game.Screens.Edit.Components; using osu.Game.Screens.Edit.Components.Timelines.Summary; using osuTK; @@ -57,7 +58,7 @@ namespace osu.Game.Screens.Edit new Dimension(GridSizeMode.Absolute, 170), new Dimension(), new Dimension(GridSizeMode.Absolute, 220), - new Dimension(GridSizeMode.Absolute, 140), + new Dimension(GridSizeMode.Absolute, HitObjectComposer.TOOLBOX_CONTRACTED_SIZE_RIGHT), }, Content = new[] { @@ -69,7 +70,6 @@ namespace osu.Game.Screens.Edit TestGameplayButton = new TestGameplayButton { RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding { Left = 10 }, Size = new Vector2(1), Action = editor.TestGameplay, } diff --git a/osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineArea.cs b/osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineArea.cs index fb7ce8e423..88c5d0104b 100644 --- a/osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineArea.cs +++ b/osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineArea.cs @@ -11,6 +11,7 @@ using osu.Game.Graphics.UserInterface; using osu.Game.Localisation; using osu.Game.Overlays; using osu.Game.Resources.Localisation.Web; +using osu.Game.Rulesets.Edit; using osuTK; namespace osu.Game.Screens.Edit.Compose.Components.Timeline @@ -36,6 +37,8 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline OsuCheckbox controlPointsCheckbox; OsuCheckbox ticksCheckbox; + const float padding = 10; + InternalChildren = new Drawable[] { new GridContainer @@ -51,7 +54,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline new Dimension(GridSizeMode.Absolute, 140), new Dimension(), new Dimension(GridSizeMode.Absolute, 35), - new Dimension(GridSizeMode.Absolute, 110), + new Dimension(GridSizeMode.Absolute, HitObjectComposer.TOOLBOX_CONTRACTED_SIZE_RIGHT - padding * 2), }, Content = new[] { @@ -71,7 +74,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline new FillFlowContainer { RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding(10), + Padding = new MarginPadding(padding), Direction = FillDirection.Vertical, Spacing = new Vector2(0, 4), Children = new[] @@ -124,7 +127,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline { RelativeSizeAxes = Axes.Both, Name = @"Zoom controls", - Padding = new MarginPadding { Right = 10 }, + Padding = new MarginPadding { Right = padding }, Children = new Drawable[] { new Box