1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 23:12:55 +08:00

Improve vertical flexibility of BeatmapSetOverlay's header (#5067)

Improve vertical flexibility of BeatmapSetOverlay's header
This commit is contained in:
Dean Herbert 2019-06-20 02:22:19 +09:00 committed by GitHub
commit 9858419c69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 7 deletions

View File

@ -45,7 +45,7 @@ namespace osu.Game.Overlays.BeatmapSet
ExternalLinkButton externalLink; ExternalLinkButton externalLink;
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
Height = 400; AutoSizeAxes = Axes.Y;
Masking = true; Masking = true;
EdgeEffect = new EdgeEffectParameters EdgeEffect = new EdgeEffectParameters
@ -72,7 +72,8 @@ namespace osu.Game.Overlays.BeatmapSet
}, },
new Container new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding { Top = tabs_height }, Padding = new MarginPadding { Top = tabs_height },
Children = new Drawable[] Children = new Drawable[]
{ {
@ -94,18 +95,26 @@ namespace osu.Game.Overlays.BeatmapSet
}, },
new Container new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.X,
Padding = new MarginPadding { Top = 20, Bottom = 30, Horizontal = BeatmapSetOverlay.X_PADDING }, AutoSizeAxes = Axes.Y,
Padding = new MarginPadding
{
Top = 20,
Bottom = 30,
Left = BeatmapSetOverlay.X_PADDING,
Right = BeatmapSetOverlay.X_PADDING + BeatmapSetOverlay.RIGHT_WIDTH,
},
Child = new FillFlowContainer Child = new FillFlowContainer
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical, Direction = FillDirection.Vertical,
Children = new Drawable[] Children = new Drawable[]
{ {
new Container new Container
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = 113, AutoSizeAxes = Axes.Y,
Child = Picker = new BeatmapPicker(), Child = Picker = new BeatmapPicker(),
}, },
new FillFlowContainer new FillFlowContainer
@ -158,7 +167,7 @@ namespace osu.Game.Overlays.BeatmapSet
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Margin = new MarginPadding { Right = BeatmapSetOverlay.X_PADDING }, Margin = new MarginPadding { Top = BeatmapSetOverlay.TOP_PADDING, Right = BeatmapSetOverlay.X_PADDING },
Direction = FillDirection.Vertical, Direction = FillDirection.Vertical,
Spacing = new Vector2(10), Spacing = new Vector2(10),
Children = new Drawable[] Children = new Drawable[]

View File

@ -24,6 +24,7 @@ namespace osu.Game.Overlays
private const int fade_duration = 300; private const int fade_duration = 300;
public const float X_PADDING = 40; public const float X_PADDING = 40;
public const float TOP_PADDING = 25;
public const float RIGHT_WIDTH = 275; public const float RIGHT_WIDTH = 275;
private readonly Header header; private readonly Header header;