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

Merge pull request #11009 from peppy/settings-reduce-visual-clutter

Attempt to reduce settings visual clutter with better paddings
This commit is contained in:
Bartłomiej Dach 2020-11-30 17:25:43 +01:00 committed by GitHub
commit ff8f030cf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 12 deletions

View File

@ -1,16 +1,15 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osuTK;
using osuTK.Graphics;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using System.Collections.Generic;
using System.Linq;
using osuTK.Graphics;
namespace osu.Game.Overlays.Settings
{
@ -26,7 +25,7 @@ namespace osu.Game.Overlays.Settings
public virtual IEnumerable<string> FilterTerms => new[] { Header };
private const int header_size = 26;
private const int header_margin = 25;
private const int margin = 20;
private const int border_size = 2;
public bool MatchingFilter
@ -38,7 +37,7 @@ namespace osu.Game.Overlays.Settings
protected SettingsSection()
{
Margin = new MarginPadding { Top = 20 };
Margin = new MarginPadding { Top = margin };
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
@ -46,10 +45,9 @@ namespace osu.Game.Overlays.Settings
{
Margin = new MarginPadding
{
Top = header_size + header_margin
Top = header_size
},
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 30),
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
};
@ -70,7 +68,7 @@ namespace osu.Game.Overlays.Settings
{
Padding = new MarginPadding
{
Top = 20 + border_size,
Top = margin + border_size,
Bottom = 10,
},
RelativeSizeAxes = Axes.X,
@ -82,7 +80,11 @@ namespace osu.Game.Overlays.Settings
Font = OsuFont.GetFont(size: header_size),
Text = Header,
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
}

View File

@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Settings
FlowContent = new FillFlowContainer
{
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 5),
Spacing = new Vector2(0, 8),
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
};
@ -53,7 +53,7 @@ namespace osu.Game.Overlays.Settings
new OsuSpriteText
{
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),
},
FlowContent