Update timeline colours and paddings to match new designs

This commit is contained in:
Dean Herbert
2022-05-24 16:32:44 +09:00
parent 17206bbebf
commit a905731053
2 changed files with 9 additions and 9 deletions

View File

@ -2,12 +2,12 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays;
using osuTK; using osuTK;
namespace osu.Game.Screens.Edit.Compose.Components.Timeline namespace osu.Game.Screens.Edit.Compose.Components.Timeline
@ -27,10 +27,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load(OverlayColourProvider colourProvider)
{ {
Masking = true; Masking = true;
CornerRadius = 5;
OsuCheckbox waveformCheckbox; OsuCheckbox waveformCheckbox;
OsuCheckbox controlPointsCheckbox; OsuCheckbox controlPointsCheckbox;
@ -41,7 +40,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4Extensions.FromHex("111") Colour = colourProvider.Background5
}, },
new GridContainer new GridContainer
{ {
@ -55,12 +54,13 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{ {
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X, AutoSizeAxes = Axes.X,
Name = @"Toggle controls",
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4Extensions.FromHex("222") Colour = colourProvider.Background2,
}, },
new FillFlowContainer new FillFlowContainer
{ {
@ -94,12 +94,13 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{ {
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X, AutoSizeAxes = Axes.X,
Name = @"Zoom controls",
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4Extensions.FromHex("333") Colour = colourProvider.Background3,
}, },
new Container<TimelineButton> new Container<TimelineButton>
{ {

View File

@ -15,8 +15,7 @@ namespace osu.Game.Screens.Edit
{ {
public abstract class EditorScreenWithTimeline : EditorScreen public abstract class EditorScreenWithTimeline : EditorScreen
{ {
private const float vertical_margins = 10; private const float padding = 10;
private const float horizontal_margins = 20;
private readonly BindableBeatDivisor beatDivisor = new BindableBeatDivisor(); private readonly BindableBeatDivisor beatDivisor = new BindableBeatDivisor();
@ -66,7 +65,7 @@ namespace osu.Game.Screens.Edit
Name = "Timeline content", Name = "Timeline content",
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Padding = new MarginPadding { Horizontal = horizontal_margins, Vertical = vertical_margins }, Padding = new MarginPadding { Horizontal = padding, Top = padding },
Child = new GridContainer Child = new GridContainer
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,