1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 15:53:21 +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 TRANSITION_DURATION = 400;
public const float CORNER_RADIUS = 10; public const float CORNER_RADIUS = 10;
protected const float WIDTH = 430;
public IBindable<bool> Expanded { get; } public IBindable<bool> Expanded { get; }
public readonly APIBeatmapSet BeatmapSet; public readonly APIBeatmapSet BeatmapSet;

View File

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

View File

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