1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 06:47:24 +08:00

add BlockMarkdownImage

change from AutoSize Both to AutoSize Y and RelativeSize X
This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-06-28 20:55:40 +07:00
parent 0e29ae037b
commit 1c074ff018
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -32,11 +32,7 @@ namespace osu.Game.Overlays.Wiki.Markdown
{
Children = new Drawable[]
{
new WikiMarkdownImage(linkInline)
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
},
new BlockMarkdownImage(linkInline),
parentTextComponent.CreateSpriteText().With(t =>
{
t.Text = linkInline.Title;
@ -45,5 +41,15 @@ namespace osu.Game.Overlays.Wiki.Markdown
}),
};
}
private class BlockMarkdownImage : WikiMarkdownImage
{
public BlockMarkdownImage(LinkInline linkInline)
: base(linkInline)
{
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
}
}
}
}