From 3e6968b57ebf6baf488f0e7bf893f57370bf1030 Mon Sep 17 00:00:00 2001 From: HoutarouOreki Date: Wed, 25 Jul 2018 17:04:36 +0200 Subject: [PATCH] Unify MarginPadding --- osu.Game/Overlays/Changelog/ChangelogBadges.cs | 12 +++--------- osu.Game/Overlays/Changelog/ChangelogContent.cs | 6 +++--- osu.Game/Overlays/Changelog/ChangelogContentGroup.cs | 2 +- osu.Game/Overlays/Changelog/Header/TextBadgePair.cs | 6 +----- osu.Game/Overlays/Changelog/StreamBadge.cs | 2 +- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/osu.Game/Overlays/Changelog/ChangelogBadges.cs b/osu.Game/Overlays/Changelog/ChangelogBadges.cs index 1a5e4f7d18..365d808108 100644 --- a/osu.Game/Overlays/Changelog/ChangelogBadges.cs +++ b/osu.Game/Overlays/Changelog/ChangelogBadges.cs @@ -15,8 +15,8 @@ namespace osu.Game.Overlays.Changelog public class ChangelogBadges : Container { private const float container_height = 106.5f; - private const float padding_y = 20; - private const float padding_x = 85; + private const float vertical_padding = 20; + private const float horizontal_padding = 85; public delegate void SelectionHandler(APIChangelog releaseStream, EventArgs args); @@ -40,13 +40,7 @@ namespace osu.Game.Overlays.Changelog { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Padding = new MarginPadding - { - Top = padding_y, - Bottom = padding_y, - Left = padding_x, - Right = padding_x, - }, + Padding = new MarginPadding { Vertical = vertical_padding, Horizontal = horizontal_padding }, }, }; } diff --git a/osu.Game/Overlays/Changelog/ChangelogContent.cs b/osu.Game/Overlays/Changelog/ChangelogContent.cs index 7e92ab4c26..588a61f678 100644 --- a/osu.Game/Overlays/Changelog/ChangelogContent.cs +++ b/osu.Game/Overlays/Changelog/ChangelogContent.cs @@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Changelog RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; Direction = FillDirection.Vertical; - Padding = new MarginPadding{ Bottom = 100, }; + Padding = new MarginPadding{ Bottom = 100 }; } public void ShowListing(APIChangelog[] changelog) @@ -44,7 +44,7 @@ namespace osu.Game.Overlays.Changelog RelativeSizeAxes = Axes.X, Height = 2, Colour = new Color4(17, 17, 17, 255), - Margin = new MarginPadding { Top = 30, }, + Margin = new MarginPadding { Top = 30 }, }); } changelogContentGroup = new ChangelogContentGroup(build, true); @@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Changelog RelativeSizeAxes = Axes.X, Height = 1, Colour = new Color4(32, 24, 35, 255), - Margin = new MarginPadding { Top = 30, }, + Margin = new MarginPadding { Top = 30 }, }); changelogContentGroup = new ChangelogContentGroup(build, false); diff --git a/osu.Game/Overlays/Changelog/ChangelogContentGroup.cs b/osu.Game/Overlays/Changelog/ChangelogContentGroup.cs index 1346689cb7..8768f3623b 100644 --- a/osu.Game/Overlays/Changelog/ChangelogContentGroup.cs +++ b/osu.Game/Overlays/Changelog/ChangelogContentGroup.cs @@ -105,7 +105,7 @@ namespace osu.Game.Overlays.Changelog Font = @"Exo2.0-Medium", Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, - Margin = new MarginPadding { Top = 5 } + Margin = new MarginPadding { Top = 5 }, }, ChangelogEntries = new FillFlowContainer { diff --git a/osu.Game/Overlays/Changelog/Header/TextBadgePair.cs b/osu.Game/Overlays/Changelog/Header/TextBadgePair.cs index 201524cc2f..dd4ca1ce0b 100644 --- a/osu.Game/Overlays/Changelog/Header/TextBadgePair.cs +++ b/osu.Game/Overlays/Changelog/Header/TextBadgePair.cs @@ -39,11 +39,7 @@ namespace osu.Game.Overlays.Changelog.Header Text = displayText, Anchor = Anchor.Centre, Origin = Anchor.Centre, - Margin = new MarginPadding - { - Top = 5, - Bottom = 15, - } + Margin = new MarginPadding { Top = 5, Bottom = 15 }, }, LineBadge = new LineBadge(startCollapsed) { diff --git a/osu.Game/Overlays/Changelog/StreamBadge.cs b/osu.Game/Overlays/Changelog/StreamBadge.cs index fc12d58f7a..ad5a858545 100644 --- a/osu.Game/Overlays/Changelog/StreamBadge.cs +++ b/osu.Game/Overlays/Changelog/StreamBadge.cs @@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Changelog Text = LatestBuild.UpdateStream.DisplayName, Font = @"Exo2.0-Bold", TextSize = 14, // web: 12, - Margin = new MarginPadding { Top = 6, }, + Margin = new MarginPadding { Top = 6 }, }, new SpriteText {