From f780c80c17d406f7c6518066930072de27083727 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Fri, 31 May 2019 13:03:35 +0900 Subject: [PATCH] Fix bar not expanding/collapsing correctly --- osu.Game/Overlays/Changelog/UpdateStreamBadge.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Changelog/UpdateStreamBadge.cs b/osu.Game/Overlays/Changelog/UpdateStreamBadge.cs index c39e6a6784..4f1d95bc2c 100644 --- a/osu.Game/Overlays/Changelog/UpdateStreamBadge.cs +++ b/osu.Game/Overlays/Changelog/UpdateStreamBadge.cs @@ -84,7 +84,7 @@ namespace osu.Game.Overlays.Changelog } }; - SelectedTab.ValueChanged += _ => updateState(); + SelectedTab.BindValueChanged(_ => updateState(), true); } protected override void OnActivated() => updateState(); @@ -113,7 +113,13 @@ namespace osu.Game.Overlays.Changelog private void updateState() { - if (Active.Value || IsHovered || SelectedTab.Value == null) + // Expand based on the local state + bool shouldExpand = Active.Value || IsHovered; + + // Expand based on whether no build is selected and the badge area is hovered + shouldExpand |= SelectedTab.Value == null && !externalDimRequested; + + if (shouldExpand) { expandingBar.Expand(); fadeContainer.FadeTo(1, transition_duration);