1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 05:22:54 +08:00

Fix color and underline of tab control checkboxes when initially checked

This commit is contained in:
Joehu 2020-07-11 18:27:47 -07:00
parent fda45997db
commit 4d7dc9f5eb

View File

@ -32,12 +32,6 @@ namespace osu.Game.Graphics.UserInterface
{ {
accentColour = value; accentColour = value;
if (Current.Value)
{
text.Colour = AccentColour;
icon.Colour = AccentColour;
}
updateFade(); updateFade();
} }
} }
@ -89,6 +83,8 @@ namespace osu.Game.Graphics.UserInterface
{ {
icon.Icon = selected.NewValue ? FontAwesome.Regular.CheckCircle : FontAwesome.Regular.Circle; icon.Icon = selected.NewValue ? FontAwesome.Regular.CheckCircle : FontAwesome.Regular.Circle;
text.Font = text.Font.With(weight: selected.NewValue ? FontWeight.Bold : FontWeight.Medium); text.Font = text.Font.With(weight: selected.NewValue ? FontWeight.Bold : FontWeight.Medium);
updateFade();
}; };
} }
@ -115,8 +111,8 @@ namespace osu.Game.Graphics.UserInterface
private void updateFade() private void updateFade()
{ {
box.FadeTo(IsHovered ? 1 : 0, transition_length, Easing.OutQuint); box.FadeTo(Current.Value || IsHovered ? 1 : 0, transition_length, Easing.OutQuint);
text.FadeColour(IsHovered ? Color4.White : AccentColour, transition_length, Easing.OutQuint); text.FadeColour(Current.Value || IsHovered ? Color4.White : AccentColour, transition_length, Easing.OutQuint);
} }
} }
} }