Get rid of any usage of VBoxContainer/HBoxContainer (#4653)

Co-authored-by: Swept <sweptwastaken@protonmail.com>
This commit is contained in:
Visne
2021-09-19 19:56:04 +02:00
committed by GitHub
parent 73171835f1
commit 5451f9eda1
12 changed files with 30 additions and 22 deletions

View File

@@ -1,13 +1,13 @@
<BoxContainer Orientation="Vertical"
xmlns="https://spacestation14.io">
<Control CustomMinimumSize="0 5" />
<BoxContainer xmlns="https://spacestation14.io"
Orientation="Vertical">
<Control MinSize="0 5" />
<BoxContainer Orientation="Horizontal">
<!-- <Label Text="{Loc Search}" CustomMinimumSize="100 0" /> -->
<!-- <Control CustomMinimumSize="50 0" /> -->
<LineEdit Name="FilterLineEdit" CustomMinimumSize="100 0" SizeFlagsHorizontal="FillExpand" PlaceHolder="{Loc Filter}"/>
<LineEdit Name="FilterLineEdit" MinSize="100 0" SizeFlagsHorizontal="FillExpand" PlaceHolder="{Loc Filter}"/>
</BoxContainer>
<!-- <Control CustomMinimumSize="0 5" /> -->
<ItemList
Name="PlayerItemList" SelectMode="Single" SizeFlagsVertical="FillExpand" SizeFlagsHorizontal="FillExpand"
CustomMinimumSize="100 100" />
MinSize="100 100" />
</BoxContainer>

View File

@@ -10,7 +10,7 @@ using Robust.Shared.Players;
namespace Content.Client.Administration.UI.CustomControls
{
[GenerateTypedNameReferences]
public partial class PlayerListControl : VBoxContainer
public partial class PlayerListControl : BoxContainer
{
private List<ICommonSession>? _data;

View File

@@ -56,7 +56,7 @@ namespace Content.Client.CharacterInfo.Components
}
}
private sealed class CharacterInfoControl : VBoxContainer
private sealed class CharacterInfoControl : BoxContainer
{
public SpriteView SpriteView { get; }
public Label NameLabel { get; }
@@ -68,6 +68,8 @@ namespace Content.Client.CharacterInfo.Components
{
IoCManager.InjectDependencies(this);
Orientation = LayoutOrientation.Vertical;
AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,

View File

@@ -2,10 +2,10 @@
Title="{Loc 'ui-transfer-amount-title'}"
Resizable="False">
<VBoxContainer SeparationOverride="4" CustomMinimumSize="240 80">
<HBoxContainer>
<BoxContainer Orientation="Vertical" SeparationOverride="4" MinSize="240 80">
<BoxContainer Orientation="Horizontal">
<LineEdit Name="AmountLineEdit" HorizontalExpand="True" PlaceHolder="{Loc 'ui-transfer-amount-line-edit-placeholder'}"/>
</HBoxContainer>
</BoxContainer>
<Button Name="ApplyButton" Text="{Loc 'ui-transfer-amount-apply'}"/>
</VBoxContainer>
</BoxContainer>
</SS14Window>

View File

@@ -15,7 +15,7 @@ using Robust.Shared.Utility;
namespace Content.Client.DoAfter.UI
{
public sealed class DoAfterGui : VBoxContainer
public sealed class DoAfterGui : BoxContainer
{
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IEyeManager _eyeManager = default!;
@@ -32,6 +32,8 @@ namespace Content.Client.DoAfter.UI
public DoAfterGui()
{
Orientation = LayoutOrientation.Vertical;
IoCManager.InjectDependencies(this);
IoCManager.Resolve<IUserInterfaceManager>().StateRoot.AddChild(this);
SeparationOverride = 0;

View File

@@ -1,6 +1,5 @@
<BoxContainer Orientation="Vertical"
xmlns="https://spacestation14.io">
<BoxContainer xmlns="https://spacestation14.io"
Orientation="Vertical">
<RichTextLabel Name="Title" />
<BoxContainer Orientation="Horizontal" SeparationOverride="10">
<RichTextLabel Name="Description" HorizontalExpand="True" />

View File

@@ -7,7 +7,7 @@ using Robust.Client.UserInterface.XAML;
namespace Content.Client.Ghost.Roles.UI
{
[GenerateTypedNameReferences]
public partial class GhostRolesEntry : VBoxContainer
public partial class GhostRolesEntry : BoxContainer
{
public GhostRolesEntry(GhostRoleInfo info, Action<BaseButton.ButtonEventArgs> requestAction)
{

View File

@@ -12,7 +12,7 @@ using Robust.Shared.Timing;
namespace Content.Client.HealthOverlay.UI
{
public class HealthOverlayGui : VBoxContainer
public class HealthOverlayGui : BoxContainer
{
[Dependency] private readonly IEyeManager _eyeManager = default!;
@@ -21,6 +21,7 @@ namespace Content.Client.HealthOverlay.UI
IoCManager.InjectDependencies(this);
IoCManager.Resolve<IUserInterfaceManager>().StateRoot.AddChild(this);
SeparationOverride = 0;
Orientation = LayoutOrientation.Vertical;
CritBar = new HealthOverlayBar
{

View File

@@ -9,12 +9,14 @@ using Robust.Shared.Utility;
namespace Content.Client.Info
{
public class ServerInfo : VBoxContainer
public class ServerInfo : BoxContainer
{
private readonly RichTextLabel _richTextLabel;
public ServerInfo()
{
Orientation = LayoutOrientation.Vertical;
_richTextLabel = new RichTextLabel
{
VerticalExpand = true

View File

@@ -158,7 +158,6 @@ namespace Content.Client.Storage
private void ChangeStorageVisualization(SharedBagState state)
{
if (Owner.TryGetComponent<AppearanceComponent>(out var appearanceComponent))
{
appearanceComponent.SetData(SharedBagOpenVisuals.BagState, state);
@@ -200,8 +199,9 @@ namespace Content.Client.Storage
entity.TryGetComponent(out ISpriteComponent? sprite);
entity.TryGetComponent(out ItemComponent? item);
button.AddChild(new HBoxContainer
button.AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 2,
Children =
{

View File

@@ -647,7 +647,7 @@ namespace Content.Client.Stylesheets
new StyleProperty(TextureRect.StylePropertyTexture, checkBoxTextureChecked),
}),
new StyleRule(new SelectorElement(typeof(HBoxContainer), new [] { CheckBox.StyleClassCheckBox }, null, null), new[]
new StyleRule(new SelectorElement(typeof(BoxContainer), new [] { CheckBox.StyleClassCheckBox }, null, null), new[]
{
new StyleProperty(BoxContainer.StylePropertySeparation, 10),
}),

View File

@@ -6,7 +6,7 @@ using Robust.Client.UserInterface.Controls;
namespace Content.Client.Targeting
{
public sealed class TargetingDoll : VBoxContainer
public sealed class TargetingDoll : BoxContainer
{
private TargetingZone _activeZone = TargetingZone.Middle;
public const string StyleClassTargetDollZone = "target-doll-zone";
@@ -40,6 +40,8 @@ namespace Content.Client.Targeting
public TargetingDoll(IResourceCache resourceCache)
{
Orientation = LayoutOrientation.Vertical;
_buttonHigh = new TextureButton
{
TextureNormal = resourceCache.GetTexture(TextureHigh),