Replace other hardcoded horizontal padding with const

- Also add overlay stream item padding const and account for it
This commit is contained in:
Joseph Madamba 2023-04-02 20:45:09 -07:00
parent af389b1107
commit 436f1e4ae4
No known key found for this signature in database
GPG Key ID: 8B746C7BDDF0BD76
6 changed files with 8 additions and 6 deletions

View File

@ -107,7 +107,7 @@ public BeatmapListingSearchControl()
Padding = new MarginPadding
{
Vertical = 20,
Horizontal = 40,
Horizontal = WaveOverlayContainer.HORIZONTAL_PADDING,
},
Child = new FillFlowContainer
{

View File

@ -93,7 +93,7 @@ private void showBuild(ValueChangedEvent<APIChangelogBuild> e)
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding
{
Horizontal = 65,
Horizontal = WaveOverlayContainer.HORIZONTAL_PADDING - ChangelogUpdateStreamItem.PADDING,
Vertical = 20
},
Child = Streams = new ChangelogUpdateStreamControl { Current = currentStream },

View File

@ -152,7 +152,7 @@ private void load(OverlayColourProvider colourProvider)
ShowDeleted = { BindTarget = ShowDeleted },
Margin = new MarginPadding
{
Horizontal = 70,
Horizontal = WaveOverlayContainer.HORIZONTAL_PADDING,
Vertical = 10
}
},

View File

@ -537,7 +537,7 @@ private MarginPadding getPadding(bool isTopLevel)
{
return new MarginPadding
{
Horizontal = 70,
Horizontal = WaveOverlayContainer.HORIZONTAL_PADDING,
Vertical = 15
};
}

View File

@ -79,7 +79,7 @@ private void load(OverlayColourProvider colourProvider, IAPIProvider api)
Padding = new MarginPadding
{
Top = 20,
Horizontal = 45
Horizontal = WaveOverlayContainer.HORIZONTAL_PADDING - FriendsOnlineStatusItem.PADDING
},
Child = onlineStreamControl = new FriendOnlineStreamControl(),
}

View File

@ -39,12 +39,14 @@ public bool UserHoveringArea
private FillFlowContainer<SpriteText> text;
private ExpandingBar expandingBar;
public const float PADDING = 5;
protected OverlayStreamItem(T value)
: base(value)
{
Height = 50;
Width = 90;
Margin = new MarginPadding(5);
Margin = new MarginPadding(PADDING);
}
[BackgroundDependencyLoader]