mirror of
https://github.com/osukey/osukey.git
synced 2025-05-22 14:07:38 +09: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.Tables;
|
||||||
using Markdig.Extensions.Yaml;
|
using Markdig.Extensions.Yaml;
|
||||||
using Markdig.Syntax;
|
using Markdig.Syntax;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Containers.Markdown;
|
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 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 virtual OsuMarkdownListItem CreateListItem(ListItemBlock listItemBlock) => new OsuMarkdownListItem();
|
||||||
|
|
||||||
protected override MarkdownPipeline CreateBuilder()
|
protected override MarkdownPipeline CreateBuilder()
|
||||||
|
@ -9,6 +9,8 @@ namespace osu.Game.Graphics.Containers.Markdown
|
|||||||
{
|
{
|
||||||
public class OsuMarkdownListItem : FillFlowContainer
|
public class OsuMarkdownListItem : FillFlowContainer
|
||||||
{
|
{
|
||||||
|
private const float default_left_padding = 20;
|
||||||
|
|
||||||
public OsuMarkdownListItem()
|
public OsuMarkdownListItem()
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
@ -16,6 +18,7 @@ namespace osu.Game.Graphics.Containers.Markdown
|
|||||||
|
|
||||||
Direction = FillDirection.Vertical;
|
Direction = FillDirection.Vertical;
|
||||||
Spacing = new Vector2(10, 10);
|
Spacing = new Vector2(10, 10);
|
||||||
|
Padding = new MarginPadding { Left = default_left_padding };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user