1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

Merge pull request #26207 from frenzibyte/fix-dropdown-colour

Fix dropdown colour not updating correctly on enabled state changes
This commit is contained in:
Bartłomiej Dach 2023-12-29 14:07:09 +01:00 committed by GitHub
commit f80f6a8c5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -363,6 +363,7 @@ namespace osu.Game.Graphics.UserInterface
base.LoadComplete();
SearchBar.State.ValueChanged += _ => updateColour();
Enabled.BindValueChanged(_ => updateColour());
updateColour();
}
@ -383,6 +384,9 @@ namespace osu.Game.Graphics.UserInterface
var hoveredColour = colourProvider?.Light4 ?? colours.PinkDarker;
var unhoveredColour = colourProvider?.Background5 ?? Color4.Black.Opacity(0.5f);
Colour = Color4.White;
Alpha = Enabled.Value ? 1 : 0.3f;
if (SearchBar.State.Value == Visibility.Visible)
{
Icon.Colour = hovered ? hoveredColour.Lighten(0.5f) : Colour4.White;