mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 14:12:54 +08:00
Fix subsection headers not being displayed in many cases. + spacing tweaks.
This commit is contained in:
parent
6b66ecc131
commit
a2dd5f09d3
@ -61,7 +61,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
{
|
{
|
||||||
Margin = new MarginPadding { Top = headerSize + headerMargin },
|
Margin = new MarginPadding { Top = headerSize + headerMargin },
|
||||||
Direction = FlowDirection.VerticalOnly,
|
Direction = FlowDirection.VerticalOnly,
|
||||||
Spacing = new Vector2(0, 50),
|
Spacing = new Vector2(0, 30),
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
},
|
},
|
||||||
|
@ -4,12 +4,13 @@
|
|||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options
|
namespace osu.Game.Overlays.Options
|
||||||
{
|
{
|
||||||
public abstract class OptionsSubsection : Container
|
public abstract class OptionsSubsection : FlowContainer
|
||||||
{
|
{
|
||||||
private Container<Drawable> content;
|
private Container<Drawable> content;
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
@ -20,23 +21,21 @@ namespace osu.Game.Overlays.Options
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
|
Direction = FlowDirection.VerticalOnly;
|
||||||
AddInternal(new Drawable[]
|
AddInternal(new Drawable[]
|
||||||
{
|
{
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Text = Header.ToUpper(),
|
||||||
|
Margin = new MarginPadding { Bottom = 10 },
|
||||||
|
Font = @"Exo2.0-Black",
|
||||||
|
},
|
||||||
content = new FlowContainer
|
content = new FlowContainer
|
||||||
{
|
{
|
||||||
Direction = FlowDirection.VerticalOnly,
|
Direction = FlowDirection.VerticalOnly,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Spacing = new Vector2(0, 5),
|
Spacing = new Vector2(0, 5),
|
||||||
Children = new[]
|
|
||||||
{
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
TextSize = 17,
|
|
||||||
Text = Header.ToUpper(),
|
|
||||||
Font = @"Exo2.0-Black",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user