1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 10:53:10 +08:00

Adjust various paddings and spacings in settings to make them easier to visually parse

This commit is contained in:
Dean Herbert 2020-11-30 17:43:53 +09:00
parent a3dd22f5c2
commit fe48b2279c
2 changed files with 11 additions and 8 deletions

View File

@ -26,7 +26,7 @@ namespace osu.Game.Overlays.Settings
public virtual IEnumerable<string> FilterTerms => new[] { Header }; public virtual IEnumerable<string> FilterTerms => new[] { Header };
private const int header_size = 26; private const int header_size = 26;
private const int header_margin = 25; private const int margin = 20;
private const int border_size = 2; private const int border_size = 2;
public bool MatchingFilter public bool MatchingFilter
@ -38,7 +38,7 @@ namespace osu.Game.Overlays.Settings
protected SettingsSection() protected SettingsSection()
{ {
Margin = new MarginPadding { Top = 20 }; Margin = new MarginPadding { Top = margin };
AutoSizeAxes = Axes.Y; AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
@ -46,10 +46,9 @@ namespace osu.Game.Overlays.Settings
{ {
Margin = new MarginPadding Margin = new MarginPadding
{ {
Top = header_size + header_margin Top = header_size
}, },
Direction = FillDirection.Vertical, Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 30),
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
}; };
@ -70,7 +69,7 @@ namespace osu.Game.Overlays.Settings
{ {
Padding = new MarginPadding Padding = new MarginPadding
{ {
Top = 20 + border_size, Top = margin + border_size,
Bottom = 10, Bottom = 10,
}, },
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
@ -82,7 +81,11 @@ namespace osu.Game.Overlays.Settings
Font = OsuFont.GetFont(size: header_size), Font = OsuFont.GetFont(size: header_size),
Text = Header, Text = Header,
Colour = colours.Yellow, Colour = colours.Yellow,
Margin = new MarginPadding { Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS } Margin = new MarginPadding
{
Left = SettingsPanel.CONTENT_MARGINS,
Right = SettingsPanel.CONTENT_MARGINS
}
}, },
FlowContent FlowContent
} }

View File

@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Settings
FlowContent = new FillFlowContainer FlowContent = new FillFlowContainer
{ {
Direction = FillDirection.Vertical, Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 5), Spacing = new Vector2(0, 8),
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
}; };
@ -53,7 +53,7 @@ namespace osu.Game.Overlays.Settings
new OsuSpriteText new OsuSpriteText
{ {
Text = Header.ToUpperInvariant(), Text = Header.ToUpperInvariant(),
Margin = new MarginPadding { Bottom = 10, Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS }, Margin = new MarginPadding { Vertical = 30, Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS },
Font = OsuFont.GetFont(weight: FontWeight.Bold), Font = OsuFont.GetFont(weight: FontWeight.Bold),
}, },
FlowContent FlowContent