mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:12:56 +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:
commit
f80f6a8c5b
@ -363,6 +363,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
SearchBar.State.ValueChanged += _ => updateColour();
|
SearchBar.State.ValueChanged += _ => updateColour();
|
||||||
|
Enabled.BindValueChanged(_ => updateColour());
|
||||||
updateColour();
|
updateColour();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,6 +384,9 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
var hoveredColour = colourProvider?.Light4 ?? colours.PinkDarker;
|
var hoveredColour = colourProvider?.Light4 ?? colours.PinkDarker;
|
||||||
var unhoveredColour = colourProvider?.Background5 ?? Color4.Black.Opacity(0.5f);
|
var unhoveredColour = colourProvider?.Background5 ?? Color4.Black.Opacity(0.5f);
|
||||||
|
|
||||||
|
Colour = Color4.White;
|
||||||
|
Alpha = Enabled.Value ? 1 : 0.3f;
|
||||||
|
|
||||||
if (SearchBar.State.Value == Visibility.Visible)
|
if (SearchBar.State.Value == Visibility.Visible)
|
||||||
{
|
{
|
||||||
Icon.Colour = hovered ? hoveredColour.Lighten(0.5f) : Colour4.White;
|
Icon.Colour = hovered ? hoveredColour.Lighten(0.5f) : Colour4.White;
|
||||||
|
Loading…
Reference in New Issue
Block a user