From 983eed32fc8f328837cb50428b621a0ac1b93385 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 3 May 2022 14:48:00 +0900 Subject: [PATCH] Reduce complexity of icon container nesting --- .../UserInterface/ShearedSearchTextBox.cs | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/ShearedSearchTextBox.cs b/osu.Game/Graphics/UserInterface/ShearedSearchTextBox.cs index d16ae2498a..0c34a04a65 100644 --- a/osu.Game/Graphics/UserInterface/ShearedSearchTextBox.cs +++ b/osu.Game/Graphics/UserInterface/ShearedSearchTextBox.cs @@ -66,31 +66,20 @@ public ShearedSearchTextBox() RelativeSizeAxes = Axes.Both, Size = Vector2.One }, - new Container + new SpriteIcon { - Name = @"Icon container", - RelativeSizeAxes = Axes.Y, - Width = 50, - Origin = Anchor.CentreRight, - Anchor = Anchor.CentreRight, - Children = new Drawable[] - { - new SpriteIcon - { - Icon = FontAwesome.Solid.Search, - Origin = Anchor.Centre, - Anchor = Anchor.Centre, - Size = new Vector2(16), - Shear = -Shear - } - } + Icon = FontAwesome.Solid.Search, + Origin = Anchor.Centre, + Anchor = Anchor.Centre, + Size = new Vector2(16), + Shear = -Shear } } }, ColumnDimensions = new[] { new Dimension(), - new Dimension(GridSizeMode.AutoSize) + new Dimension(GridSizeMode.Absolute, 50), } } };