From 150bf670649e61ac071796fa4056aa372ff9023b Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Fri, 29 Dec 2023 05:30:50 +0300 Subject: [PATCH 1/2] Fix dropdown colour not updating correctly on enabled state changes --- osu.Game/Graphics/UserInterface/OsuDropdown.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Graphics/UserInterface/OsuDropdown.cs b/osu.Game/Graphics/UserInterface/OsuDropdown.cs index 632036fef9..c99a21ac28 100644 --- a/osu.Game/Graphics/UserInterface/OsuDropdown.cs +++ b/osu.Game/Graphics/UserInterface/OsuDropdown.cs @@ -363,6 +363,7 @@ namespace osu.Game.Graphics.UserInterface base.LoadComplete(); SearchBar.State.ValueChanged += _ => updateColour(); + Enabled.BindValueChanged(_ => updateColour()); updateColour(); } From c147ec0a98b22bec0a4635e1fc65cc32c5b34ddf Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Fri, 29 Dec 2023 05:31:13 +0300 Subject: [PATCH 2/2] Update dropdown disabled state to match with other components --- osu.Game/Graphics/UserInterface/OsuDropdown.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Graphics/UserInterface/OsuDropdown.cs b/osu.Game/Graphics/UserInterface/OsuDropdown.cs index c99a21ac28..2dc701dc9d 100644 --- a/osu.Game/Graphics/UserInterface/OsuDropdown.cs +++ b/osu.Game/Graphics/UserInterface/OsuDropdown.cs @@ -384,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;