Unify MarginPadding

This commit is contained in:
HoutarouOreki
2018-07-25 17:04:36 +02:00
parent a7a6e52c16
commit 3e6968b57e
5 changed files with 9 additions and 19 deletions

View File

@ -15,8 +15,8 @@ namespace osu.Game.Overlays.Changelog
public class ChangelogBadges : Container public class ChangelogBadges : Container
{ {
private const float container_height = 106.5f; private const float container_height = 106.5f;
private const float padding_y = 20; private const float vertical_padding = 20;
private const float padding_x = 85; private const float horizontal_padding = 85;
public delegate void SelectionHandler(APIChangelog releaseStream, EventArgs args); public delegate void SelectionHandler(APIChangelog releaseStream, EventArgs args);
@ -40,13 +40,7 @@ namespace osu.Game.Overlays.Changelog
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Padding = new MarginPadding Padding = new MarginPadding { Vertical = vertical_padding, Horizontal = horizontal_padding },
{
Top = padding_y,
Bottom = padding_y,
Left = padding_x,
Right = padding_x,
},
}, },
}; };
} }

View File

@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Changelog
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y; AutoSizeAxes = Axes.Y;
Direction = FillDirection.Vertical; Direction = FillDirection.Vertical;
Padding = new MarginPadding{ Bottom = 100, }; Padding = new MarginPadding{ Bottom = 100 };
} }
public void ShowListing(APIChangelog[] changelog) public void ShowListing(APIChangelog[] changelog)
@ -44,7 +44,7 @@ namespace osu.Game.Overlays.Changelog
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = 2, Height = 2,
Colour = new Color4(17, 17, 17, 255), Colour = new Color4(17, 17, 17, 255),
Margin = new MarginPadding { Top = 30, }, Margin = new MarginPadding { Top = 30 },
}); });
} }
changelogContentGroup = new ChangelogContentGroup(build, true); changelogContentGroup = new ChangelogContentGroup(build, true);
@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Changelog
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = 1, Height = 1,
Colour = new Color4(32, 24, 35, 255), Colour = new Color4(32, 24, 35, 255),
Margin = new MarginPadding { Top = 30, }, Margin = new MarginPadding { Top = 30 },
}); });
changelogContentGroup = new ChangelogContentGroup(build, false); changelogContentGroup = new ChangelogContentGroup(build, false);

View File

@ -105,7 +105,7 @@ namespace osu.Game.Overlays.Changelog
Font = @"Exo2.0-Medium", Font = @"Exo2.0-Medium",
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Margin = new MarginPadding { Top = 5 } Margin = new MarginPadding { Top = 5 },
}, },
ChangelogEntries = new FillFlowContainer ChangelogEntries = new FillFlowContainer
{ {

View File

@ -39,11 +39,7 @@ namespace osu.Game.Overlays.Changelog.Header
Text = displayText, Text = displayText,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Margin = new MarginPadding Margin = new MarginPadding { Top = 5, Bottom = 15 },
{
Top = 5,
Bottom = 15,
}
}, },
LineBadge = new LineBadge(startCollapsed) LineBadge = new LineBadge(startCollapsed)
{ {

View File

@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Changelog
Text = LatestBuild.UpdateStream.DisplayName, Text = LatestBuild.UpdateStream.DisplayName,
Font = @"Exo2.0-Bold", Font = @"Exo2.0-Bold",
TextSize = 14, // web: 12, TextSize = 14, // web: 12,
Margin = new MarginPadding { Top = 6, }, Margin = new MarginPadding { Top = 6 },
}, },
new SpriteText new SpriteText
{ {