mirror of
https://github.com/ppy/osu
synced 2024-12-26 08:53:10 +00:00
Move colouring to full icon content rather than background
This commit is contained in:
parent
0f203531d9
commit
09aa3e065d
@ -76,7 +76,7 @@ namespace osu.Desktop.Security
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
Icon = FontAwesome.Solid.ShieldAlt;
|
||||
IconBackground.Colour = colours.YellowDark;
|
||||
IconContent.Colour = colours.YellowDark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Database
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
IconBackground.Colour = colours.RedDark;
|
||||
IconContent.Colour = colours.RedDark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ namespace osu.Game.Online.Chat
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours, ChatOverlay chatOverlay, INotificationOverlay notificationOverlay)
|
||||
{
|
||||
IconBackground.Colour = colours.PurpleDark;
|
||||
IconContent.Colour = colours.PurpleDark;
|
||||
|
||||
Activated = delegate
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
IconBackground.Colour = ColourInfo.GradientVertical(colours.GreenDark, colours.GreenLight);
|
||||
IconContent.Colour = ColourInfo.GradientVertical(colours.GreenDark, colours.GreenLight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
Light.Pulsate = false;
|
||||
progressBar.Active = false;
|
||||
|
||||
iconBackground.FadeColour(ColourInfo.GradientVertical(colourQueued, colourQueued.Lighten(0.5f)), colour_fade_duration);
|
||||
IconContent.FadeColour(ColourInfo.GradientVertical(colourQueued, colourQueued.Lighten(0.5f)), colour_fade_duration);
|
||||
loadingSpinner.Show();
|
||||
break;
|
||||
|
||||
@ -112,14 +112,14 @@ namespace osu.Game.Overlays.Notifications
|
||||
Light.Pulsate = true;
|
||||
progressBar.Active = true;
|
||||
|
||||
iconBackground.FadeColour(ColourInfo.GradientVertical(colourActive, colourActive.Lighten(0.5f)), colour_fade_duration);
|
||||
IconContent.FadeColour(ColourInfo.GradientVertical(colourActive, colourActive.Lighten(0.5f)), colour_fade_duration);
|
||||
loadingSpinner.Show();
|
||||
break;
|
||||
|
||||
case ProgressNotificationState.Cancelled:
|
||||
cancellationTokenSource.Cancel();
|
||||
|
||||
iconBackground.FadeColour(ColourInfo.GradientVertical(Color4.Gray, Color4.Gray.Lighten(0.5f)), colour_fade_duration);
|
||||
IconContent.FadeColour(ColourInfo.GradientVertical(Color4.Gray, Color4.Gray.Lighten(0.5f)), colour_fade_duration);
|
||||
loadingSpinner.Hide();
|
||||
|
||||
var icon = new SpriteIcon
|
||||
@ -168,7 +168,6 @@ namespace osu.Game.Overlays.Notifications
|
||||
private Color4 colourActive;
|
||||
private Color4 colourCancelled;
|
||||
|
||||
private Box iconBackground = null!;
|
||||
private LoadingSpinner loadingSpinner = null!;
|
||||
|
||||
private readonly TextFlowContainer textDrawable;
|
||||
@ -206,10 +205,10 @@ namespace osu.Game.Overlays.Notifications
|
||||
|
||||
IconContent.AddRange(new Drawable[]
|
||||
{
|
||||
iconBackground = new Box
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.White,
|
||||
Colour = colourProvider.Background5,
|
||||
},
|
||||
loadingSpinner = new LoadingSpinner
|
||||
{
|
||||
|
@ -41,8 +41,6 @@ namespace osu.Game.Overlays.Notifications
|
||||
}
|
||||
}
|
||||
|
||||
protected Box IconBackground = null!;
|
||||
|
||||
private TextFlowContainer? textDrawable;
|
||||
|
||||
private SpriteIcon? iconDrawable;
|
||||
@ -54,7 +52,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
|
||||
IconContent.AddRange(new Drawable[]
|
||||
{
|
||||
IconBackground = new Box
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colourProvider.Background5,
|
||||
|
@ -530,7 +530,7 @@ namespace osu.Game.Screens.Play
|
||||
private void load(OsuColour colours, AudioManager audioManager, INotificationOverlay notificationOverlay, VolumeOverlay volumeOverlay)
|
||||
{
|
||||
Icon = FontAwesome.Solid.VolumeMute;
|
||||
IconBackground.Colour = colours.RedDark;
|
||||
IconContent.Colour = colours.RedDark;
|
||||
|
||||
Activated = delegate
|
||||
{
|
||||
@ -584,7 +584,7 @@ namespace osu.Game.Screens.Play
|
||||
private void load(OsuColour colours, INotificationOverlay notificationOverlay)
|
||||
{
|
||||
Icon = FontAwesome.Solid.BatteryQuarter;
|
||||
IconBackground.Colour = colours.RedDark;
|
||||
IconContent.Colour = colours.RedDark;
|
||||
|
||||
Activated = delegate
|
||||
{
|
||||
|
@ -99,7 +99,7 @@ namespace osu.Game.Updater
|
||||
private void load(OsuColour colours, ChangelogOverlay changelog, INotificationOverlay notificationOverlay)
|
||||
{
|
||||
Icon = FontAwesome.Solid.CheckSquare;
|
||||
IconBackground.Colour = colours.BlueDark;
|
||||
IconContent.Colour = colours.BlueDark;
|
||||
|
||||
Activated = delegate
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user