1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 01:27:29 +08:00

Make InternalPadding a bit simpler

This commit is contained in:
Dean Herbert 2019-01-25 14:46:45 +09:00
parent 787d4da153
commit 7ed215c521
2 changed files with 4 additions and 5 deletions

View File

@ -29,10 +29,9 @@ namespace osu.Game.Overlays.SearchableList
protected virtual Drawable CreateSupplementaryControls() => null;
/// <summary>
/// Add padding to internal components of the control.
/// This does not affect the background and the tab strip.
/// The amount of padding added to content (does not affect background or tab control strip).
/// </summary>
protected virtual float InternalPadding => 0;
protected virtual float ContentHorizontalPadding => SearchableListOverlay.WIDTH_PADDING;
protected SearchableListFilterControl()
{
@ -71,7 +70,7 @@ namespace osu.Game.Overlays.SearchableList
Padding = new MarginPadding
{
Top = padding,
Horizontal = SearchableListOverlay.WIDTH_PADDING + InternalPadding
Horizontal = ContentHorizontalPadding
},
Children = new Drawable[]
{

View File

@ -13,7 +13,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
protected override Color4 BackgroundColour => OsuColour.FromHex(@"362e42");
protected override PrimaryFilter DefaultTab => PrimaryFilter.Open;
protected override float InternalPadding => OsuScreen.HORIZONTAL_OVERFLOW_PADDING;
protected override float ContentHorizontalPadding => base.ContentHorizontalPadding + OsuScreen.HORIZONTAL_OVERFLOW_PADDING;
public FilterControl()
{