1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 16:47:24 +08:00

Make FilterControl not scroll with the panels

This commit is contained in:
DrabWeb 2017-05-22 02:03:26 -03:00
parent 4e2126dca8
commit 6bf0ca59fe
2 changed files with 14 additions and 13 deletions

View File

@ -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[]

View File

@ -77,24 +77,18 @@ namespace osu.Game.Overlays
},
},
},
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Top = Header.HEIGHT + FilterControl.HEIGHT },
Children = new[]
{
new ScrollContainer
{
RelativeSizeAxes = Axes.Both,
ScrollDraggerVisible = false,
Padding = new MarginPadding { Top = Header.HEIGHT },
Children = new Drawable[]
{
new ReverseDepthFillFlowContainer<Drawable>
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
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,