mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Adjust vertical spacings in individual subsections
This commit is contained in:
@ -165,7 +165,13 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
LabelText = TabletSettingsStrings.Rotation,
|
LabelText = TabletSettingsStrings.Rotation,
|
||||||
Current = rotation
|
Current = rotation
|
||||||
},
|
},
|
||||||
new RotationPresetButtons(tabletHandler),
|
new RotationPresetButtons(tabletHandler)
|
||||||
|
{
|
||||||
|
Padding = new MarginPadding
|
||||||
|
{
|
||||||
|
Horizontal = SettingsPanel.CONTENT_MARGINS
|
||||||
|
}
|
||||||
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
|
@ -6,7 +6,6 @@ using osu.Framework.Graphics.Sprites;
|
|||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
using osu.Game.Overlays.Settings.Sections.Maintenance;
|
using osu.Game.Overlays.Settings.Sections.Maintenance;
|
||||||
using osuTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections
|
namespace osu.Game.Overlays.Settings.Sections
|
||||||
{
|
{
|
||||||
@ -21,7 +20,6 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
|
|
||||||
public MaintenanceSection()
|
public MaintenanceSection()
|
||||||
{
|
{
|
||||||
FlowContent.Spacing = new Vector2(0, 5);
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new GeneralSettings()
|
new GeneralSettings()
|
||||||
|
@ -16,7 +16,6 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osu.Game.Skinning.Editor;
|
using osu.Game.Skinning.Editor;
|
||||||
using osuTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections
|
namespace osu.Game.Overlays.Settings.Sections
|
||||||
{
|
{
|
||||||
@ -63,8 +62,6 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[BackgroundDependencyLoader(permitNulls: true)]
|
||||||
private void load(OsuConfigManager config, [CanBeNull] SkinEditorOverlay skinEditor)
|
private void load(OsuConfigManager config, [CanBeNull] SkinEditorOverlay skinEditor)
|
||||||
{
|
{
|
||||||
FlowContent.Spacing = new Vector2(0, 5);
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
skinDropdown = new SkinSettingsDropdown(),
|
skinDropdown = new SkinSettingsDropdown(),
|
||||||
|
@ -12,6 +12,7 @@ using osu.Framework.Input.Events;
|
|||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings
|
namespace osu.Game.Overlays.Settings
|
||||||
{
|
{
|
||||||
@ -30,6 +31,8 @@ namespace osu.Game.Overlays.Settings
|
|||||||
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
|
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
|
||||||
public virtual IEnumerable<string> FilterTerms => new[] { Header.ToString() };
|
public virtual IEnumerable<string> FilterTerms => new[] { Header.ToString() };
|
||||||
|
|
||||||
|
public const int ITEM_SPACING = 14;
|
||||||
|
|
||||||
private const int header_size = 24;
|
private const int header_size = 24;
|
||||||
private const int border_size = 4;
|
private const int border_size = 4;
|
||||||
|
|
||||||
@ -52,8 +55,9 @@ namespace osu.Game.Overlays.Settings
|
|||||||
{
|
{
|
||||||
Margin = new MarginPadding
|
Margin = new MarginPadding
|
||||||
{
|
{
|
||||||
Top = header_size
|
Top = 36
|
||||||
},
|
},
|
||||||
|
Spacing = new Vector2(0, ITEM_SPACING),
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
@ -46,13 +46,17 @@ namespace osu.Game.Overlays.Settings
|
|||||||
|
|
||||||
FlowContent = new FillFlowContainer
|
FlowContent = new FillFlowContainer
|
||||||
{
|
{
|
||||||
|
Margin = new MarginPadding { Top = SettingsSection.ITEM_SPACING },
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Spacing = new Vector2(0, 8),
|
Spacing = new Vector2(0, SettingsSection.ITEM_SPACING),
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private const int header_height = 43;
|
||||||
|
private const int header_font_size = 20;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
@ -60,9 +64,9 @@ namespace osu.Game.Overlays.Settings
|
|||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = Header.ToString().ToUpper(), // TODO: Add localisation support after https://github.com/ppy/osu-framework/pull/4603 is merged.
|
Text = Header,
|
||||||
Margin = new MarginPadding { Vertical = 30, Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS },
|
Margin = new MarginPadding { Vertical = (header_height - header_font_size) * 0.5f, Horizontal = SettingsPanel.CONTENT_MARGINS },
|
||||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
Font = OsuFont.GetFont(size: header_font_size),
|
||||||
},
|
},
|
||||||
FlowContent
|
FlowContent
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user