mirror of https://github.com/ppy/osu
Merge pull request #18446 from frenzibyte/editor-row-attribute-background
Update row attribute background colour to fit screen
This commit is contained in:
commit
68684f5fe7
|
@ -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)
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue