From a912e56ca995db8560785761209f68dcc93a0e43 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sat, 18 May 2024 11:04:40 +0300 Subject: [PATCH] Fix checkboxes applying extra padding --- osu.Game/Graphics/UserInterface/OsuCheckbox.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuCheckbox.cs b/osu.Game/Graphics/UserInterface/OsuCheckbox.cs index b7b405a7e8..caab3d97f8 100644 --- a/osu.Game/Graphics/UserInterface/OsuCheckbox.cs +++ b/osu.Game/Graphics/UserInterface/OsuCheckbox.cs @@ -52,8 +52,6 @@ public OsuCheckbox(bool nubOnRight = true, float nubSize = Nub.DEFAULT_EXPANDED_ AutoSizeAxes = Axes.Y; RelativeSizeAxes = Axes.X; - const float nub_padding = 5; - Children = new Drawable[] { LabelTextFlowContainer = new OsuTextFlowContainer(ApplyLabelParameters) @@ -69,15 +67,13 @@ public OsuCheckbox(bool nubOnRight = true, float nubSize = Nub.DEFAULT_EXPANDED_ { 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);