1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 16:12:54 +08:00

Use same size button for everything

This commit is contained in:
Joseph Madamba 2024-07-27 18:32:35 -07:00
parent b5ff2dab43
commit b4ca07300a
5 changed files with 7 additions and 20 deletions

View File

@ -9,7 +9,6 @@ using osu.Framework.Graphics.Cursor;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Screens.Ranking;
using osuTK;
using osuTK.Input;
namespace osu.Game.Tests.Visual.Ranking
@ -30,9 +29,9 @@ namespace osu.Game.Tests.Visual.Ranking
Origin = Anchor.Centre,
Child = collectionButton = new CollectionButton(beatmapInfo)
{
RelativeSizeAxes = Axes.None,
Size = new Vector2(50),
}
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
},
});
}

View File

@ -9,7 +9,6 @@ using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Screens.Ranking;
using osuTK;
namespace osu.Game.Tests.Visual.Ranking
{
@ -27,8 +26,6 @@ namespace osu.Game.Tests.Visual.Ranking
{
AddStep("create button", () => Child = favourite = new FavouriteButton(beatmapSetInfo)
{
RelativeSizeAxes = Axes.None,
Size = new Vector2(50),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
});
@ -66,8 +63,6 @@ namespace osu.Game.Tests.Visual.Ranking
{
AddStep("make beatmap invalid", () => Child = favourite = new FavouriteButton(invalidBeatmapSetInfo)
{
RelativeSizeAxes = Axes.None,
Size = new Vector2(50),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
});

View File

@ -22,7 +22,7 @@ namespace osu.Game.Screens.Ranking
{
this.beatmapInfo = beatmapInfo;
Size = new Vector2(50, 30);
Size = new Vector2(75, 30);
TooltipText = "collections";
}

View File

@ -40,7 +40,7 @@ namespace osu.Game.Screens.Ranking
BeatmapSetInfo = beatmapSetInfo;
current = new BindableWithCurrent<BeatmapSetFavouriteState>(new BeatmapSetFavouriteState(false, 0));
Size = new Vector2(50, 30);
Size = new Vector2(75, 30);
}
[BackgroundDependencyLoader]

View File

@ -211,17 +211,10 @@ namespace osu.Game.Screens.Ranking
}
if (Score?.BeatmapInfo != null)
{
buttons.Add(new CollectionButton(Score.BeatmapInfo) { Width = 75 });
}
buttons.Add(new CollectionButton(Score.BeatmapInfo));
if (Score?.BeatmapInfo?.BeatmapSet != null && Score.BeatmapInfo.BeatmapSet.OnlineID > 0)
{
buttons.Add(new FavouriteButton(Score.BeatmapInfo.BeatmapSet)
{
Width = 75
});
}
buttons.Add(new FavouriteButton(Score.BeatmapInfo.BeatmapSet));
}
protected override void LoadComplete()