From 6c3637a62a993d4cbcfe41eee99cd28f89c99929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 18 Oct 2021 20:36:47 +0200 Subject: [PATCH] Remove grid usage in `KeyBindingRow` --- .../Settings/Sections/Input/KeyBindingRow.cs | 47 +++++++++---------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/osu.Game/Overlays/Settings/Sections/Input/KeyBindingRow.cs b/osu.Game/Overlays/Settings/Sections/Input/KeyBindingRow.cs index c2667fbdac..f44f02d0ed 100644 --- a/osu.Game/Overlays/Settings/Sections/Input/KeyBindingRow.cs +++ b/osu.Game/Overlays/Settings/Sections/Input/KeyBindingRow.cs @@ -82,32 +82,29 @@ namespace osu.Game.Overlays.Settings.Sections.Input { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; + Padding = new MarginPadding { Right = SettingsPanel.CONTENT_MARGINS }; - InternalChild = new GridContainer + InternalChildren = new Drawable[] { - RelativeSizeAxes = Axes.X, - AutoSizeAxes = Axes.Y, - ColumnDimensions = new[] + new Container { - new Dimension(GridSizeMode.Absolute, SettingsPanel.CONTENT_MARGINS), - new Dimension(), - new Dimension(GridSizeMode.Absolute, SettingsPanel.CONTENT_MARGINS), - }, - RowDimensions = new[] - { - new Dimension(GridSizeMode.AutoSize) - }, - Content = new[] - { - new Drawable[] + RelativeSizeAxes = Axes.Y, + Width = SettingsPanel.CONTENT_MARGINS, + Child = new RestoreDefaultValueButton + { + Current = isDefault, + Action = RestoreDefaults, + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + } + }, + new Container + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Padding = new MarginPadding { Left = SettingsPanel.CONTENT_MARGINS }, + Children = new Drawable[] { - new RestoreDefaultValueButton - { - Current = isDefault, - Action = RestoreDefaults, - Anchor = Anchor.Centre, - Origin = Anchor.Centre - }, content = new Container { RelativeSizeAxes = Axes.X, @@ -154,10 +151,10 @@ namespace osu.Game.Overlays.Settings.Sections.Input }, } } - }, - new HoverClickSounds() + } } - } + }, + new HoverClickSounds() }; foreach (var b in bindings)