1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-22 17:40:01 +08:00

Make FilterControl not scroll with the panels

This commit is contained in:
DrabWeb
2017-05-22 02:03:26 -03:00
Unverified
parent 4e2126dca8
commit 6bf0ca59fe
2 changed files with 14 additions and 13 deletions
+3 -1
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[]
+11 -12
View File
@@ -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,