Adjust vertical spacings in individual subsections

This commit is contained in:
Bartłomiej Dach
2021-10-09 19:54:20 +02:00
parent e23a54f1e6
commit 855a74b8a0
5 changed files with 20 additions and 11 deletions

View File

@ -46,13 +46,17 @@ namespace osu.Game.Overlays.Settings
FlowContent = new FillFlowContainer
{
Margin = new MarginPadding { Top = SettingsSection.ITEM_SPACING },
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 8),
Spacing = new Vector2(0, SettingsSection.ITEM_SPACING),
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
};
}
private const int header_height = 43;
private const int header_font_size = 20;
[BackgroundDependencyLoader]
private void load()
{
@ -60,9 +64,9 @@ namespace osu.Game.Overlays.Settings
{
new OsuSpriteText
{
Text = Header.ToString().ToUpper(), // TODO: Add localisation support after https://github.com/ppy/osu-framework/pull/4603 is merged.
Margin = new MarginPadding { Vertical = 30, Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS },
Font = OsuFont.GetFont(weight: FontWeight.Bold),
Text = Header,
Margin = new MarginPadding { Vertical = (header_height - header_font_size) * 0.5f, Horizontal = SettingsPanel.CONTENT_MARGINS },
Font = OsuFont.GetFont(size: header_font_size),
},
FlowContent
});