mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 18:27:26 +08:00
handle list padding in OsuMarkdownListItem
Reference : 5b0e3ac3ff/resources/assets/less/bem/osu-md.less (L193-L194)
This commit is contained in:
parent
a24a279404
commit
1e8b3f3a8c
@ -6,6 +6,7 @@ using Markdig.Extensions.AutoIdentifiers;
|
||||
using Markdig.Extensions.Tables;
|
||||
using Markdig.Extensions.Yaml;
|
||||
using Markdig.Syntax;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Containers.Markdown;
|
||||
|
||||
@ -44,6 +45,11 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
|
||||
protected override MarkdownTable CreateTable(Table table) => new OsuMarkdownTable(table);
|
||||
|
||||
protected override MarkdownList CreateList(ListBlock listBlock) => new MarkdownList
|
||||
{
|
||||
Padding = new MarginPadding(0)
|
||||
};
|
||||
|
||||
protected virtual OsuMarkdownListItem CreateListItem(ListItemBlock listItemBlock) => new OsuMarkdownListItem();
|
||||
|
||||
protected override MarkdownPipeline CreateBuilder()
|
||||
|
@ -9,6 +9,8 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
{
|
||||
public class OsuMarkdownListItem : FillFlowContainer
|
||||
{
|
||||
private const float default_left_padding = 20;
|
||||
|
||||
public OsuMarkdownListItem()
|
||||
{
|
||||
AutoSizeAxes = Axes.Y;
|
||||
@ -16,6 +18,7 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
|
||||
Direction = FillDirection.Vertical;
|
||||
Spacing = new Vector2(10, 10);
|
||||
Padding = new MarginPadding { Left = default_left_padding };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user