1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 17:27:24 +08:00

Fix shear factor of ScreenFooterButtons not matching anything else

When shear factors differ between components that are close to each other (`BackButtonV2` and `ScreenFooterButton` in this case), they look completely ugly.
This commit is contained in:
Salman Ahmed 2024-05-16 05:03:34 +03:00
parent 7e8d5a5b0a
commit 9446f45acf

View File

@ -25,8 +25,9 @@ namespace osu.Game.Screens.Footer
{
public partial class ScreenFooterButton : OsuClickableContainer, IKeyBindingHandler<GlobalAction>
{
// This should be 12 by design, but an extra allowance is added due to the corner radius specification.
private const float shear_width = 13.5f;
// if we go by design, both this and ShearedButton should have shear factor as 1/7,
// but ShearedButton uses 1/5 so we must follow suit for the design to stay consistent.
private const float shear = 1f / 5f;
protected const int CORNER_RADIUS = 10;
protected const int BUTTON_HEIGHT = 90;
@ -34,7 +35,7 @@ namespace osu.Game.Screens.Footer
public Bindable<Visibility> OverlayState = new Bindable<Visibility>();
protected static readonly Vector2 BUTTON_SHEAR = new Vector2(shear_width / BUTTON_HEIGHT, 0);
protected static readonly Vector2 BUTTON_SHEAR = new Vector2(shear, 0);
[Resolved]
private OverlayColourProvider colourProvider { get; set; } = null!;