Skip to content

Commit

Permalink
Merge pull request #26077 from peppy/profile-cover-pixel-fix
Browse files Browse the repository at this point in the history
Fix user profile cover showing 1px line when contracted
  • Loading branch information
bdach authored Dec 23, 2023
2 parents a011a1e + a2e5f62 commit fde0276
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions osu.Game/Overlays/Profile/Header/TopHeaderContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,14 @@ private void updateCoverState()
bool expanded = coverToggle.CoverExpanded.Value;

cover.ResizeHeightTo(expanded ? 250 : 0, transition_duration, Easing.OutQuint);

// Without this a very tiny slither of the cover will be visible even with a size of zero.
// Integer masking woes, no doubt.
if (expanded)
cover.FadeIn(transition_duration, Easing.OutQuint);
else
cover.FadeOut(transition_duration, Easing.InQuint);

avatar.ResizeTo(new Vector2(expanded ? 120 : content_height), transition_duration, Easing.OutQuint);
avatar.TransformTo(nameof(avatar.CornerRadius), expanded ? 40f : 20f, transition_duration, Easing.OutQuint);
flow.TransformTo(nameof(flow.Spacing), new Vector2(expanded ? 20f : 10f), transition_duration, Easing.OutQuint);
Expand Down

0 comments on commit fde0276

Please sign in to comment.