mirror of https://github.com/ppy/osu
Fix checkboxes applying extra padding
This commit is contained in:
parent
9532725eb7
commit
a912e56ca9
|
@ -52,8 +52,6 @@ public OsuCheckbox(bool nubOnRight = true, float nubSize = Nub.DEFAULT_EXPANDED_
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
|
|
||||||
const float nub_padding = 5;
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
LabelTextFlowContainer = new OsuTextFlowContainer(ApplyLabelParameters)
|
LabelTextFlowContainer = new OsuTextFlowContainer(ApplyLabelParameters)
|
||||||
|
@ -69,15 +67,13 @@ public OsuCheckbox(bool nubOnRight = true, float nubSize = Nub.DEFAULT_EXPANDED_
|
||||||
{
|
{
|
||||||
Nub.Anchor = Anchor.CentreRight;
|
Nub.Anchor = Anchor.CentreRight;
|
||||||
Nub.Origin = Anchor.CentreRight;
|
Nub.Origin = Anchor.CentreRight;
|
||||||
Nub.Margin = new MarginPadding { Right = nub_padding };
|
LabelTextFlowContainer.Padding = new MarginPadding { Right = Nub.DEFAULT_EXPANDED_SIZE + 10f };
|
||||||
LabelTextFlowContainer.Padding = new MarginPadding { Right = Nub.DEFAULT_EXPANDED_SIZE + nub_padding * 2 };
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Nub.Anchor = Anchor.CentreLeft;
|
Nub.Anchor = Anchor.CentreLeft;
|
||||||
Nub.Origin = Anchor.CentreLeft;
|
Nub.Origin = Anchor.CentreLeft;
|
||||||
Nub.Margin = new MarginPadding { Left = nub_padding };
|
LabelTextFlowContainer.Padding = new MarginPadding { Left = Nub.DEFAULT_EXPANDED_SIZE + 10f };
|
||||||
LabelTextFlowContainer.Padding = new MarginPadding { Left = Nub.DEFAULT_EXPANDED_SIZE + nub_padding * 2 };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Nub.Current.BindTo(Current);
|
Nub.Current.BindTo(Current);
|
||||||
|
|
Loading…
Reference in New Issue