mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 12:02:54 +08:00
Adjust vertical spacings in individual subsections
This commit is contained in:
parent
e23a54f1e6
commit
855a74b8a0
@ -165,7 +165,13 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
LabelText = TabletSettingsStrings.Rotation,
|
||||
Current = rotation
|
||||
},
|
||||
new RotationPresetButtons(tabletHandler),
|
||||
new RotationPresetButtons(tabletHandler)
|
||||
{
|
||||
Padding = new MarginPadding
|
||||
{
|
||||
Horizontal = SettingsPanel.CONTENT_MARGINS
|
||||
}
|
||||
},
|
||||
new SettingsSlider<float>
|
||||
{
|
||||
TransferValueOnCommit = true,
|
||||
|
@ -6,7 +6,6 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Overlays.Settings.Sections.Maintenance;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
@ -21,7 +20,6 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
|
||||
public MaintenanceSection()
|
||||
{
|
||||
FlowContent.Spacing = new Vector2(0, 5);
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new GeneralSettings()
|
||||
|
@ -16,7 +16,6 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Game.Skinning.Editor;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
@ -63,8 +62,6 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(OsuConfigManager config, [CanBeNull] SkinEditorOverlay skinEditor)
|
||||
{
|
||||
FlowContent.Spacing = new Vector2(0, 5);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
skinDropdown = new SkinSettingsDropdown(),
|
||||
|
@ -12,6 +12,7 @@ using osu.Framework.Input.Events;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Settings
|
||||
{
|
||||
@ -30,6 +31,8 @@ namespace osu.Game.Overlays.Settings
|
||||
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
|
||||
public virtual IEnumerable<string> FilterTerms => new[] { Header.ToString() };
|
||||
|
||||
public const int ITEM_SPACING = 14;
|
||||
|
||||
private const int header_size = 24;
|
||||
private const int border_size = 4;
|
||||
|
||||
@ -52,8 +55,9 @@ namespace osu.Game.Overlays.Settings
|
||||
{
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Top = header_size
|
||||
Top = 36
|
||||
},
|
||||
Spacing = new Vector2(0, ITEM_SPACING),
|
||||
Direction = FillDirection.Vertical,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
|
@ -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
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user