mirror of
https://github.com/ppy/osu
synced 2025-02-02 03:11:58 +00:00
Fix dropdown header padding when selected mod filter is hidden
This commit is contained in:
parent
8e6e90eaec
commit
9fdbe58326
@ -20,6 +20,7 @@ namespace osu.Game.Screens.Select
|
|||||||
public static readonly float HEIGHT = 24;
|
public static readonly float HEIGHT = 24;
|
||||||
private readonly OsuTabControlCheckbox modsCheckbox;
|
private readonly OsuTabControlCheckbox modsCheckbox;
|
||||||
private readonly OsuTabControl<BeatmapDetailTab> tabs;
|
private readonly OsuTabControl<BeatmapDetailTab> tabs;
|
||||||
|
private readonly Container tabsContainer;
|
||||||
|
|
||||||
public Action<BeatmapDetailTab, bool> OnFilter; //passed the selected tab and if mods is checked
|
public Action<BeatmapDetailTab, bool> OnFilter; //passed the selected tab and if mods is checked
|
||||||
|
|
||||||
@ -39,10 +40,9 @@ namespace osu.Game.Screens.Select
|
|||||||
Height = 1,
|
Height = 1,
|
||||||
Colour = Color4.White.Opacity(0.2f),
|
Colour = Color4.White.Opacity(0.2f),
|
||||||
},
|
},
|
||||||
new Container
|
tabsContainer = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Right = 100 },
|
|
||||||
Child = tabs = new OsuTabControl<BeatmapDetailTab>
|
Child = tabs = new OsuTabControl<BeatmapDetailTab>
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
@ -79,6 +79,8 @@ namespace osu.Game.Screens.Select
|
|||||||
OnFilter?.Invoke(tabs.Current.Value, modsCheckbox.Current.Value);
|
OnFilter?.Invoke(tabs.Current.Value, modsCheckbox.Current.Value);
|
||||||
|
|
||||||
modsCheckbox.FadeTo(tabs.Current.Value == BeatmapDetailTab.Details ? 0 : 1, 200, Easing.OutQuint);
|
modsCheckbox.FadeTo(tabs.Current.Value == BeatmapDetailTab.Details ? 0 : 1, 200, Easing.OutQuint);
|
||||||
|
|
||||||
|
tabsContainer.Padding = new MarginPadding { Right = tabs.Current.Value == BeatmapDetailTab.Details ? 0 : 100 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user