Skip to content

Commit

Permalink
Update row attribute background colour to fit screen
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzibyte committed May 27, 2022
1 parent 5eb16ff commit e71d907
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 5 additions & 3 deletions osu.Game/Screens/Edit/Timing/RowAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public class RowAttribute : CompositeDrawable

private readonly string label;

protected Drawable Background { get; private set; }

protected FillFlowContainer Content { get; private set; }

public RowAttribute(ControlPoint point, string label)
Expand All @@ -41,11 +43,11 @@ private void load(OsuColour colours, OverlayColourProvider overlayColours)
Masking = true;
CornerRadius = 3;

InternalChildren = new Drawable[]
InternalChildren = new[]
{
new Box
Background = new Box
{
Colour = overlayColours.Background4,
Colour = overlayColours.Background5,
RelativeSizeAxes = Axes.Both,
},
Content = new FillFlowContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Beatmaps.Timing;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays;

namespace osu.Game.Screens.Edit.Timing.RowAttributes
{
Expand All @@ -24,10 +25,12 @@ public TimingRowAttribute(TimingControlPoint timing)
}

[BackgroundDependencyLoader]
private void load()
private void load(OverlayColourProvider colourProvider)
{
Content.Add(text = new AttributeText(Point));

Background.Colour = colourProvider.Background4;

timeSignature.BindValueChanged(_ => updateText());
beatLength.BindValueChanged(_ => updateText(), true);
}
Expand Down

0 comments on commit e71d907

Please sign in to comment.