1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 09:12:58 +08:00

Merge pull request #19295 from frenzibyte/filter-control-available-area

Fix sorting mode not filling up to usable area in filter control
This commit is contained in:
Dan Balasescu 2022-07-22 17:20:40 +09:00 committed by GitHub
commit 1d69090301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,34 +115,25 @@ namespace osu.Game.Screens.Select
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
}, },
new FillFlowContainer new GridContainer
{ {
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
Direction = FillDirection.Horizontal,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Spacing = new Vector2(OsuTabControl<SortMode>.HORIZONTAL_SPACING, 0), ColumnDimensions = new[]
Children = new Drawable[]
{ {
new OsuTabControlCheckbox new Dimension(GridSizeMode.AutoSize),
{ new Dimension(GridSizeMode.Absolute, OsuTabControl<SortMode>.HORIZONTAL_SPACING),
Text = "Show converted", new Dimension(),
Current = config.GetBindable<bool>(OsuSetting.ShowConvertedBeatmaps), new Dimension(GridSizeMode.Absolute, OsuTabControl<SortMode>.HORIZONTAL_SPACING),
Anchor = Anchor.BottomRight, new Dimension(GridSizeMode.AutoSize),
Origin = Anchor.BottomRight,
}, },
sortTabs = new OsuTabControl<SortMode> RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) },
Content = new[]
{
new[]
{ {
RelativeSizeAxes = Axes.X,
Width = 0.5f,
Height = 24,
AutoSort = true,
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
AccentColour = colours.GreenLight,
Current = { BindTarget = sortMode }
},
new OsuSpriteText new OsuSpriteText
{ {
Text = SortStrings.Default, Text = SortStrings.Default,
@ -151,6 +142,26 @@ namespace osu.Game.Screens.Select
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
}, },
Empty(),
sortTabs = new OsuTabControl<SortMode>
{
RelativeSizeAxes = Axes.X,
Height = 24,
AutoSort = true,
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
AccentColour = colours.GreenLight,
Current = { BindTarget = sortMode }
},
Empty(),
new OsuTabControlCheckbox
{
Text = "Show converted",
Current = config.GetBindable<bool>(OsuSetting.ShowConvertedBeatmaps),
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
},
}
} }
}, },
} }