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:
parent
27c5cc5bd8
commit
3ca238825b
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user