add left padding for ordered list

In osu-md.less, this rule style[1] removes padding left in ordered list.
But in this rule style[2], pseudo element `::before` is used as marker
or counter and has minimal width 30px. So we use this as left padding
size.

[1] 5b0e3ac3ff/resources/assets/less/bem/osu-md.less (L196-L200)
[2] 5b0e3ac3ff/resources/assets/less/bem/osu-md.less (L210-L219)
This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-04-30 10:56:41 +07:00
parent c0d9f9f8c6
commit e6579352f9
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -14,7 +14,9 @@ namespace osu.Game.Graphics.Containers.Markdown
private readonly int level;
private readonly int order;
private readonly bool isOrdered;
private const float default_left_padding = 20;
private const float ordered_left_padding = 30;
private const float unordered_left_padding = 20;
[Resolved]
private IMarkdownTextComponent parentTextComponent { get; set; }
@ -29,7 +31,7 @@ namespace osu.Game.Graphics.Containers.Markdown
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
Padding = new MarginPadding { Left = default_left_padding };
Padding = new MarginPadding { Left = isOrdered ? ordered_left_padding : unordered_left_padding };
InternalChildren = new Drawable[]
{