Remove usages of negative Margin / Padding

Replaces such usage with more sensible settings, like changing the
position or size.
This commit is contained in:
Thomas Müller
2017-03-02 19:16:31 +01:00
parent d74a601180
commit c732890664
3 changed files with 2 additions and 6 deletions

View File

@ -57,10 +57,7 @@ namespace osu.Game.Graphics.UserInterface
c1.Origin = c1.Anchor = (value & Anchor.x2) > 0 ? Anchor.TopLeft : Anchor.TopRight;
c2.Origin = c2.Anchor = (value & Anchor.x2) > 0 ? Anchor.TopRight : Anchor.TopLeft;
Margin = new MarginPadding
{
Right = (value & Anchor.x2) > 0 ? -SIZE_RETRACTED.X * shear * 0.5f : 0
};
X = (value & Anchor.x2) > 0 ? SIZE_RETRACTED.X * shear * 0.5f : 0;
c1.Depth = (value & Anchor.x2) > 0 ? 0 : 1;
c2.Depth = (value & Anchor.x2) > 0 ? 1 : 0;