mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 18:42:56 +08:00
Make scrollabletimeline use gridcontainer
This commit is contained in:
parent
0b7432d3db
commit
870ce8868c
@ -34,7 +34,8 @@ namespace osu.Game.Tests.Visual
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(1000, 100)
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Size = new Vector2(0.8f, 100)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -33,16 +33,17 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = OsuColour.FromHex("111")
|
||||
},
|
||||
new FillFlowContainer
|
||||
new GridContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Children = new Drawable[]
|
||||
Content = new[]
|
||||
{
|
||||
new Drawable[]
|
||||
{
|
||||
new Container
|
||||
{
|
||||
AutoSizeAxes = Axes.X,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
AutoSizeAxes = Axes.X,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
@ -70,8 +71,8 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
||||
},
|
||||
new Container
|
||||
{
|
||||
AutoSizeAxes = Axes.X,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
AutoSizeAxes = Axes.X,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
@ -93,7 +94,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Height = 0.5f,
|
||||
Icon = FontAwesome.fa_search_plus,
|
||||
Action = () => timelineContainer.Zoom++
|
||||
// Action = () => timelineContainer.Zoom++
|
||||
},
|
||||
new TimelineButton
|
||||
{
|
||||
@ -102,13 +103,20 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Height = 0.5f,
|
||||
Icon = FontAwesome.fa_search_minus,
|
||||
Action = () => timelineContainer.Zoom--
|
||||
// Action = () => timelineContainer.Zoom--
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
timelineContainer = new ScrollingTimelineContainer { RelativeSizeAxes = Axes.Y }
|
||||
timelineContainer = new ScrollingTimelineContainer { RelativeSizeAxes = Axes.Both }
|
||||
},
|
||||
},
|
||||
ColumnDimensions = new[]
|
||||
{
|
||||
new Dimension(GridSizeMode.AutoSize),
|
||||
new Dimension(GridSizeMode.AutoSize),
|
||||
new Dimension(GridSizeMode.Distributed),
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -120,12 +128,5 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
||||
timelineContainer.Beatmap.BindTo(Beatmap);
|
||||
timelineContainer.WaveformVisible.BindTo(waveformCheckbox.Current);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
timelineContainer.Size = new Vector2(DrawSize.X - timelineContainer.DrawPosition.X, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user