mirror of https://github.com/ppy/osu
Fix settings notice text class tinting everything with yellow
This commit is contained in:
parent
f43ab323ff
commit
c8fb796660
|
@ -91,7 +91,7 @@ private void load(OsuColour colours)
|
|||
Origin = Anchor.TopCentre,
|
||||
Text = TabletSettingsStrings.NoTabletDetected,
|
||||
},
|
||||
new SettingsNoticeText
|
||||
new SettingsNoticeText(colours)
|
||||
{
|
||||
TextAnchor = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
|
|
|
@ -73,7 +73,7 @@ public LocalisableString? WarningText
|
|||
return;
|
||||
|
||||
// construct lazily for cases where the label is not needed (may be provided by the Control).
|
||||
FlowContent.Add(warningText = new SettingsNoticeText { Margin = new MarginPadding { Bottom = 5 } });
|
||||
FlowContent.Add(warningText = new SettingsNoticeText(colours) { Margin = new MarginPadding { Bottom = 5 } });
|
||||
}
|
||||
|
||||
warningText.Alpha = hasValue ? 0 : 1;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
|
@ -10,10 +9,9 @@ namespace osu.Game.Overlays.Settings
|
|||
{
|
||||
public class SettingsNoticeText : LinkFlowContainer
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
public SettingsNoticeText(OsuColour colours)
|
||||
: base(s => s.Colour = colours.Yellow)
|
||||
{
|
||||
Colour = colours.Yellow;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue