mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 01:02:56 +08:00
Use fixed numbers for padding instead
This commit is contained in:
parent
11d937beab
commit
8e6e90eaec
@ -18,7 +18,6 @@ namespace osu.Game.Overlays.SearchableList
|
||||
private const float padding = 10;
|
||||
|
||||
private readonly Container filterContainer;
|
||||
private readonly Container tabsContainer;
|
||||
private readonly Box tabStrip;
|
||||
|
||||
public readonly SearchTextBox Search;
|
||||
@ -86,10 +85,11 @@ namespace osu.Game.Overlays.SearchableList
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Margin = new MarginPadding { Top = controls != null ? padding : 0 },
|
||||
},
|
||||
tabsContainer = new Container
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Padding = new MarginPadding { Right = 225 },
|
||||
Child = Tabs = new PageTabControl<T>
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
@ -133,8 +133,6 @@ namespace osu.Game.Overlays.SearchableList
|
||||
|
||||
Height = filterContainer.Height;
|
||||
DisplayStyleControl.Margin = new MarginPadding { Top = filterContainer.Height - 35, Right = SearchableListOverlay.WIDTH_PADDING };
|
||||
|
||||
tabsContainer.Padding = new MarginPadding { Right = DisplayStyleControl.Width };
|
||||
}
|
||||
|
||||
private class FilterSearchTextBox : SearchTextBox
|
||||
|
@ -20,7 +20,6 @@ namespace osu.Game.Screens.Select
|
||||
public static readonly float HEIGHT = 24;
|
||||
private readonly OsuTabControlCheckbox modsCheckbox;
|
||||
private readonly OsuTabControl<BeatmapDetailTab> tabs;
|
||||
private readonly Container tabsContainer;
|
||||
|
||||
public Action<BeatmapDetailTab, bool> OnFilter; //passed the selected tab and if mods is checked
|
||||
|
||||
@ -40,9 +39,10 @@ namespace osu.Game.Screens.Select
|
||||
Height = 1,
|
||||
Colour = Color4.White.Opacity(0.2f),
|
||||
},
|
||||
tabsContainer = new Container
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Right = 100 },
|
||||
Child = tabs = new OsuTabControl<BeatmapDetailTab>
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
@ -74,13 +74,6 @@ namespace osu.Game.Screens.Select
|
||||
tabs.Current.TriggerChange();
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
tabsContainer.Padding = new MarginPadding { Right = modsCheckbox.Width };
|
||||
}
|
||||
|
||||
private void invokeOnFilter()
|
||||
{
|
||||
OnFilter?.Invoke(tabs.Current.Value, modsCheckbox.Current.Value);
|
||||
|
Loading…
Reference in New Issue
Block a user