1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07:25 +08:00

Adjust some padding details on ShearedSliderBar.cs as well as colouration tweaks.

This commit is contained in:
mk56-spn 2023-01-26 15:00:48 +01:00
parent 2f90ffccfc
commit 8840694674

View File

@ -33,7 +33,10 @@ namespace osu.Game.Graphics.UserInterface
set
{
accentColour = value;
LeftBox.Colour = value;
// We want to slightly darken the colour for the box because the sheared slider has the boxes at the same height as the nub,
// making the nub invisible when not hovered.
LeftBox.Colour = value.Darken(0.1f);
}
}
@ -158,8 +161,8 @@ namespace osu.Game.Graphics.UserInterface
protected override void UpdateAfterChildren()
{
base.UpdateAfterChildren();
LeftBox.Scale = new Vector2(Math.Clamp(RangePadding + Nub.DrawPosition.X - Nub.DrawWidth / 2.1f, 0, Math.Max(0, DrawWidth)), 1);
RightBox.Scale = new Vector2(Math.Clamp(DrawWidth - Nub.DrawPosition.X - RangePadding - Nub.DrawWidth / 2.1f, 0, Math.Max(0, DrawWidth)), 1);
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);
}
protected override void UpdateValue(float value)