Replace most VBox/HBoxContainers with BoxContainers (#4274)
This commit is contained in:
@@ -14,6 +14,7 @@ using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Utility;
|
||||
using static Content.Shared.Administration.PermissionsEuiMsg;
|
||||
using static Robust.Client.UserInterface.Controls.BoxContainer;
|
||||
|
||||
namespace Content.Client.Administration.UI
|
||||
{
|
||||
@@ -316,15 +317,17 @@ namespace Content.Client.Administration.UI
|
||||
};
|
||||
|
||||
AdminsList = new GridContainer {Columns = 5, VerticalExpand = true};
|
||||
var adminVBox = new VBoxContainer
|
||||
var adminVBox = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
Children = {AdminsList, AddAdminButton},
|
||||
};
|
||||
TabContainer.SetTabTitle(adminVBox, Loc.GetString("permissions-eui-menu-admins-tab-title"));
|
||||
|
||||
AdminRanksList = new GridContainer {Columns = 3};
|
||||
var rankVBox = new VBoxContainer
|
||||
var rankVBox = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
Children = { AdminRanksList, AddAdminRankButton}
|
||||
};
|
||||
TabContainer.SetTabTitle(rankVBox, Loc.GetString("permissions-eui-menu-admin-ranks-tab-title"));
|
||||
@@ -451,7 +454,10 @@ namespace Content.Client.Administration.UI
|
||||
FlagButtons.Add(flag, (inherit, sub, plus));
|
||||
}
|
||||
|
||||
var bottomButtons = new HBoxContainer();
|
||||
var bottomButtons = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal
|
||||
};
|
||||
if (data != null)
|
||||
{
|
||||
// show remove button.
|
||||
@@ -461,17 +467,20 @@ namespace Content.Client.Administration.UI
|
||||
|
||||
bottomButtons.AddChild(SaveButton);
|
||||
|
||||
Contents.AddChild(new VBoxContainer
|
||||
Contents.AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
Children =
|
||||
{
|
||||
new HBoxContainer
|
||||
new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
SeparationOverride = 2,
|
||||
Children =
|
||||
{
|
||||
new VBoxContainer
|
||||
new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
HorizontalExpand = true,
|
||||
Children =
|
||||
{
|
||||
@@ -541,7 +550,10 @@ namespace Content.Client.Administration.UI
|
||||
HorizontalAlignment = HAlignment.Right,
|
||||
HorizontalExpand = true
|
||||
};
|
||||
var flagsBox = new VBoxContainer();
|
||||
var flagsBox = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical
|
||||
};
|
||||
|
||||
foreach (var flag in AdminFlagsHelper.AllFlags)
|
||||
{
|
||||
@@ -565,7 +577,10 @@ namespace Content.Client.Administration.UI
|
||||
flagsBox.AddChild(checkBox);
|
||||
}
|
||||
|
||||
var bottomButtons = new HBoxContainer();
|
||||
var bottomButtons = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal
|
||||
};
|
||||
if (data != null)
|
||||
{
|
||||
// show remove button.
|
||||
@@ -575,8 +590,9 @@ namespace Content.Client.Administration.UI
|
||||
|
||||
bottomButtons.AddChild(SaveButton);
|
||||
|
||||
Contents.AddChild(new VBoxContainer
|
||||
Contents.AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
Children =
|
||||
{
|
||||
NameEdit,
|
||||
|
||||
Reference in New Issue
Block a user