1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Unify width of normal and extra card sizes

This commit is contained in:
Bartłomiej Dach 2021-12-24 09:17:07 +01:00
parent 27c5cc5bd8
commit 3ca238825b
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
3 changed files with 6 additions and 6 deletions

View File

@ -21,6 +21,8 @@ namespace osu.Game.Beatmaps.Drawables.Cards
public const float TRANSITION_DURATION = 400;
public const float CORNER_RADIUS = 10;
protected const float WIDTH = 430;
public IBindable<bool> Expanded { get; }
public readonly APIBeatmapSet BeatmapSet;

View File

@ -25,7 +25,6 @@ namespace osu.Game.Beatmaps.Drawables.Cards
protected override Drawable IdleContent => idleBottomContent;
protected override Drawable DownloadInProgressContent => downloadProgressBar;
private const float width = 475;
private const float height = 140;
[Cached]
@ -51,7 +50,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
[BackgroundDependencyLoader(true)]
private void load(BeatmapSetOverlay? beatmapSetOverlay)
{
Width = width;
Width = WIDTH;
Height = height;
FillFlowContainer leftIconArea = null!;
@ -81,7 +80,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
buttonContainer = new CollapsibleButtonContainer(BeatmapSet)
{
X = height - CORNER_RADIUS,
Width = width - height + CORNER_RADIUS,
Width = WIDTH - height + CORNER_RADIUS,
FavouriteState = { BindTarget = FavouriteState },
ButtonsCollapsedWidth = CORNER_RADIUS,
ButtonsExpandedWidth = 30,

View File

@ -26,7 +26,6 @@ namespace osu.Game.Beatmaps.Drawables.Cards
protected override Drawable IdleContent => idleBottomContent;
protected override Drawable DownloadInProgressContent => downloadProgressBar;
private const float width = 408;
private const float height = 100;
[Cached]
@ -52,7 +51,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
[BackgroundDependencyLoader]
private void load()
{
Width = width;
Width = WIDTH;
Height = height;
FillFlowContainer leftIconArea = null!;
@ -82,7 +81,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
buttonContainer = new CollapsibleButtonContainer(BeatmapSet)
{
X = height - CORNER_RADIUS,
Width = width - height + CORNER_RADIUS,
Width = WIDTH - height + CORNER_RADIUS,
FavouriteState = { BindTarget = FavouriteState },
ButtonsCollapsedWidth = CORNER_RADIUS,
ButtonsExpandedWidth = 30,