mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 12:22:56 +08:00
Fix bar not expanding/collapsing correctly
This commit is contained in:
parent
c211f1d0fe
commit
f780c80c17
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user