1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-05 02:43:16 +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.Framework.Testing;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Screens.Ranking; using osu.Game.Screens.Ranking;
using osuTK;
using osuTK.Input; using osuTK.Input;
namespace osu.Game.Tests.Visual.Ranking namespace osu.Game.Tests.Visual.Ranking
@ -30,9 +29,9 @@ namespace osu.Game.Tests.Visual.Ranking
Origin = Anchor.Centre, Origin = Anchor.Centre,
Child = collectionButton = new CollectionButton(beatmapInfo) Child = collectionButton = new CollectionButton(beatmapInfo)
{ {
RelativeSizeAxes = Axes.None, Anchor = Anchor.Centre,
Size = new Vector2(50), 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;
using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.API.Requests.Responses;
using osu.Game.Screens.Ranking; using osu.Game.Screens.Ranking;
using osuTK;
namespace osu.Game.Tests.Visual.Ranking namespace osu.Game.Tests.Visual.Ranking
{ {
@ -27,8 +26,6 @@ namespace osu.Game.Tests.Visual.Ranking
{ {
AddStep("create button", () => Child = favourite = new FavouriteButton(beatmapSetInfo) AddStep("create button", () => Child = favourite = new FavouriteButton(beatmapSetInfo)
{ {
RelativeSizeAxes = Axes.None,
Size = new Vector2(50),
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
}); });
@ -66,8 +63,6 @@ namespace osu.Game.Tests.Visual.Ranking
{ {
AddStep("make beatmap invalid", () => Child = favourite = new FavouriteButton(invalidBeatmapSetInfo) AddStep("make beatmap invalid", () => Child = favourite = new FavouriteButton(invalidBeatmapSetInfo)
{ {
RelativeSizeAxes = Axes.None,
Size = new Vector2(50),
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
}); });

View File

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

View File

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

View File

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