mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Use relative sizing for MonthDropdown
This commit is contained in:
@ -22,46 +22,35 @@ namespace osu.Game.Tests.Visual.Online
|
||||
[Test]
|
||||
public void CreateClosedMonthPanel()
|
||||
{
|
||||
AddStep("Create", () => Child = new Container
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.TopCentre,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colourProvider.Background2,
|
||||
},
|
||||
new MonthDropdown(posts),
|
||||
}
|
||||
});
|
||||
create(false);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CreateOpenMonthPanel()
|
||||
{
|
||||
AddStep("Create", () => Child = new Container
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.TopCentre,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colourProvider.Background2,
|
||||
},
|
||||
new MonthDropdown(posts)
|
||||
{
|
||||
IsOpen = { Value = true }
|
||||
},
|
||||
}
|
||||
});
|
||||
create(true);
|
||||
}
|
||||
|
||||
private void create(bool isOpen) => AddStep("Create", () => Child = new Container
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.TopCentre,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Width = 160,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colourProvider.Background2,
|
||||
},
|
||||
new MonthDropdown(posts)
|
||||
{
|
||||
IsOpen = { Value = isOpen }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
private static List<APINewsPost> posts => new List<APINewsPost>
|
||||
{
|
||||
new APINewsPost
|
||||
|
Reference in New Issue
Block a user