mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 18:10:01 +08:00
Make FilterControl not scroll with the panels
This commit is contained in:
parent
4e2126dca8
commit
6bf0ca59fe
@ -21,6 +21,8 @@ namespace osu.Game.Overlays.Direct
|
||||
{
|
||||
public class FilterControl : Container
|
||||
{
|
||||
public static readonly float HEIGHT = 35 + 32 + 30 + padding * 2; // search + mode toggle buttons + sort tabs + padding
|
||||
|
||||
/// <summary>
|
||||
/// The height of the content below the filter control (tab strip + result count text).
|
||||
/// </summary>
|
||||
@ -50,7 +52,7 @@ namespace osu.Game.Overlays.Direct
|
||||
public FilterControl()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Height = 35 + 32 + 30 + padding * 2; // search + mode toggle buttons + sort tabs + padding
|
||||
Height = HEIGHT;
|
||||
DisplayStyle.Value = PanelDisplayStyle.Grid;
|
||||
|
||||
Children = new Drawable[]
|
||||
|
@ -77,24 +77,18 @@ namespace osu.Game.Overlays
|
||||
},
|
||||
},
|
||||
},
|
||||
new ScrollContainer
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ScrollDraggerVisible = false,
|
||||
Padding = new MarginPadding { Top = Header.HEIGHT },
|
||||
Children = new Drawable[]
|
||||
Padding = new MarginPadding { Top = Header.HEIGHT + FilterControl.HEIGHT },
|
||||
Children = new[]
|
||||
{
|
||||
new ReverseDepthFillFlowContainer<Drawable>
|
||||
new ScrollContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Vertical,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ScrollDraggerVisible = false,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
filter = new FilterControl
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
},
|
||||
panels = new FillFlowContainer<DirectPanel>
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
@ -106,6 +100,11 @@ namespace osu.Game.Overlays
|
||||
},
|
||||
},
|
||||
},
|
||||
filter = new FilterControl
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Margin = new MarginPadding { Top = Header.HEIGHT },
|
||||
},
|
||||
header = new Header
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
|
Loading…
x
Reference in New Issue
Block a user