Skip to content

Commit

Permalink
Fix gap in ShearedSliderBar when focused
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Oct 24, 2024
1 parent 6dd1efa commit 6e8400a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions osu.Game/Graphics/UserInterface/ShearedSliderBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public ShearedSliderBar()
CornerRadius = 5,
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Padding = new MarginPadding { Horizontal = 2 },
Child = new Container
{
RelativeSizeAxes = Axes.Both,
Expand Down Expand Up @@ -192,8 +191,8 @@ private void updateGlow()
protected override void UpdateAfterChildren()
{
base.UpdateAfterChildren();
LeftBox.Scale = new Vector2(Math.Clamp(RangePadding + Nub.DrawPosition.X - Nub.DrawWidth / 2.15f, 0, Math.Max(0, DrawWidth)), 1);
RightBox.Scale = new Vector2(Math.Clamp(DrawWidth - Nub.DrawPosition.X - RangePadding - Nub.DrawWidth / 2.15f, 0, Math.Max(0, DrawWidth)), 1);
LeftBox.Scale = new Vector2(Math.Clamp(RangePadding + Nub.DrawPosition.X - Nub.DrawWidth / 2.3f, 0, Math.Max(0, DrawWidth)), 1);
RightBox.Scale = new Vector2(Math.Clamp(DrawWidth - Nub.DrawPosition.X - RangePadding - Nub.DrawWidth / 2.3f, 0, Math.Max(0, DrawWidth)), 1);
}

protected override void UpdateValue(float value)
Expand Down

0 comments on commit 6e8400a

Please sign in to comment.