mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:52:53 +08:00
Make TimelineButtons combined take up the full height of the timeline
This commit is contained in:
parent
a6901c0a27
commit
ab62390336
@ -79,17 +79,19 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = OsuColour.FromHex("333")
|
||||
},
|
||||
new Container
|
||||
new Container<TimelineButton>
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
AutoSizeAxes = Axes.X,
|
||||
Padding = new MarginPadding { Vertical = 5 },
|
||||
Masking = true,
|
||||
Children = new[]
|
||||
{
|
||||
new TimelineButton
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Height = 0.5f,
|
||||
Icon = FontAwesome.fa_search_plus,
|
||||
Action = () => timelineContainer.Zoom++
|
||||
},
|
||||
@ -97,6 +99,8 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Height = 0.5f,
|
||||
Icon = FontAwesome.fa_search_minus,
|
||||
Action = () => timelineContainer.Zoom--
|
||||
},
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
@ -38,7 +39,14 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
||||
};
|
||||
|
||||
button.Enabled.BindTo(Enabled);
|
||||
Size = button.ButtonSize;
|
||||
Width = button.ButtonSize.X;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
button.ButtonSize = new Vector2(button.ButtonSize.X, DrawHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user