Skip to content

Commit

Permalink
Expose BeatmapCardNormal height const
Browse files Browse the repository at this point in the history
  • Loading branch information
Joehuu committed Aug 16, 2024
1 parent e01e630 commit fda17a5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions osu.Game/Beatmaps/Drawables/Cards/BeatmapCardNormal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public partial class BeatmapCardNormal : BeatmapCard
protected override Drawable IdleContent => idleBottomContent;
protected override Drawable DownloadInProgressContent => downloadProgressBar;

private const float height = 100;
public const float HEIGHT = 100;

[Cached]
private readonly BeatmapCardContent content;
Expand All @@ -42,14 +42,14 @@ public partial class BeatmapCardNormal : BeatmapCard
public BeatmapCardNormal(APIBeatmapSet beatmapSet, bool allowExpansion = true)
: base(beatmapSet, allowExpansion)
{
content = new BeatmapCardContent(height);
content = new BeatmapCardContent(HEIGHT);
}

[BackgroundDependencyLoader]
private void load()
{
Width = WIDTH;
Height = height;
Height = HEIGHT;

FillFlowContainer leftIconArea = null!;
FillFlowContainer titleBadgeArea = null!;
Expand All @@ -65,7 +65,7 @@ private void load()
thumbnail = new BeatmapCardThumbnail(BeatmapSet, BeatmapSet)
{
Name = @"Left (icon) area",
Size = new Vector2(height),
Size = new Vector2(HEIGHT),
Padding = new MarginPadding { Right = CORNER_RADIUS },
Child = leftIconArea = new FillFlowContainer
{
Expand All @@ -77,8 +77,8 @@ private void load()
},
buttonContainer = new CollapsibleButtonContainer(BeatmapSet)
{
X = height - CORNER_RADIUS,
Width = WIDTH - height + CORNER_RADIUS,
X = HEIGHT - CORNER_RADIUS,
Width = WIDTH - HEIGHT + CORNER_RADIUS,
FavouriteState = { BindTarget = FavouriteState },
ButtonsCollapsedWidth = CORNER_RADIUS,
ButtonsExpandedWidth = 30,
Expand Down

0 comments on commit fda17a5

Please sign in to comment.