1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:07:52 +08:00

Merge pull request #28201 from frenzibyte/fix-settings-padding

Fix checkboxes looking misaligned when placed next to a slider bar
This commit is contained in:
Dean Herbert 2024-05-19 10:36:54 +08:00 committed by GitHub
commit 9fcd3b562a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,8 +52,6 @@ namespace osu.Game.Graphics.UserInterface
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
const float nub_padding = 5;
Children = new Drawable[]
{
LabelTextFlowContainer = new OsuTextFlowContainer(ApplyLabelParameters)
@ -69,15 +67,13 @@ namespace osu.Game.Graphics.UserInterface
{
Nub.Anchor = Anchor.CentreRight;
Nub.Origin = Anchor.CentreRight;
Nub.Margin = new MarginPadding { Right = nub_padding };
LabelTextFlowContainer.Padding = new MarginPadding { Right = Nub.DEFAULT_EXPANDED_SIZE + nub_padding * 2 };
LabelTextFlowContainer.Padding = new MarginPadding { Right = Nub.DEFAULT_EXPANDED_SIZE + 10f };
}
else
{
Nub.Anchor = Anchor.CentreLeft;
Nub.Origin = Anchor.CentreLeft;
Nub.Margin = new MarginPadding { Left = nub_padding };
LabelTextFlowContainer.Padding = new MarginPadding { Left = Nub.DEFAULT_EXPANDED_SIZE + nub_padding * 2 };
LabelTextFlowContainer.Padding = new MarginPadding { Left = Nub.DEFAULT_EXPANDED_SIZE + 10f };
}
Nub.Current.BindTo(Current);