mirror of https://github.com/ppy/osu
Move beat divisor control inside of `TimelineArea` and adjust metrics to match design
This commit is contained in:
parent
ebaf63b764
commit
5b2e704264
|
@ -48,14 +48,24 @@ private void load(OverlayColourProvider colourProvider)
|
|||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
RowDimensions = new[]
|
||||
{
|
||||
new Dimension(GridSizeMode.AutoSize),
|
||||
},
|
||||
ColumnDimensions = new[]
|
||||
{
|
||||
new Dimension(GridSizeMode.Absolute, 140),
|
||||
new Dimension(),
|
||||
new Dimension(GridSizeMode.Absolute, 30),
|
||||
new Dimension(GridSizeMode.Absolute, 110),
|
||||
},
|
||||
Content = new[]
|
||||
{
|
||||
new Drawable[]
|
||||
{
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
AutoSizeAxes = Axes.X,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Name = @"Toggle controls",
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -92,31 +102,31 @@ private void load(OverlayColourProvider colourProvider)
|
|||
}
|
||||
}
|
||||
},
|
||||
Timeline = new Timeline(userContent),
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
AutoSizeAxes = Axes.X,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Name = @"Zoom controls",
|
||||
Padding = new MarginPadding { Right = 5 },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colourProvider.Background3,
|
||||
Colour = colourProvider.Background2,
|
||||
},
|
||||
new Container<TimelineButton>
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
AutoSizeAxes = Axes.X,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
Children = new[]
|
||||
{
|
||||
new TimelineButton
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Height = 0.5f,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Size = new Vector2(1, 0.5f),
|
||||
Icon = FontAwesome.Solid.SearchPlus,
|
||||
Action = () => Timeline.AdjustZoomRelatively(1)
|
||||
},
|
||||
|
@ -124,8 +134,8 @@ private void load(OverlayColourProvider colourProvider)
|
|||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Height = 0.5f,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Size = new Vector2(1, 0.5f),
|
||||
Icon = FontAwesome.Solid.SearchMinus,
|
||||
Action = () => Timeline.AdjustZoomRelatively(-1)
|
||||
},
|
||||
|
@ -133,19 +143,9 @@ private void load(OverlayColourProvider colourProvider)
|
|||
}
|
||||
}
|
||||
},
|
||||
Timeline = new Timeline(userContent),
|
||||
new BeatDivisorControl { RelativeSizeAxes = Axes.Both }
|
||||
},
|
||||
},
|
||||
RowDimensions = new[]
|
||||
{
|
||||
new Dimension(GridSizeMode.AutoSize),
|
||||
},
|
||||
ColumnDimensions = new[]
|
||||
{
|
||||
new Dimension(GridSizeMode.AutoSize),
|
||||
new Dimension(GridSizeMode.AutoSize),
|
||||
new Dimension(),
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Screens.Edit.Compose.Components;
|
||||
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
||||
|
||||
namespace osu.Game.Screens.Edit
|
||||
|
@ -30,6 +29,9 @@ protected EditorScreenWithTimeline(EditorScreenMode type)
|
|||
[BackgroundDependencyLoader(true)]
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
// Grid with only two rows.
|
||||
// First is the timeline area, which should be allowed to expand as required.
|
||||
// Second is the main editor content, including the playfield and side toolbars (but not the bottom).
|
||||
Child = new GridContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
|
@ -74,7 +76,6 @@ private void load(OverlayColourProvider colourProvider)
|
|||
AutoSizeAxes = Axes.Y,
|
||||
Padding = new MarginPadding { Right = 5 },
|
||||
},
|
||||
new BeatDivisorControl { RelativeSizeAxes = Axes.Both }
|
||||
},
|
||||
},
|
||||
RowDimensions = new[]
|
||||
|
|
Loading…
Reference in New Issue