WPF layout (#3346)

This commit is contained in:
Pieter-Jan Briers
2021-02-21 12:38:56 +01:00
committed by GitHub
parent 33d6975c25
commit b898443f28
121 changed files with 1420 additions and 2069 deletions

View File

@@ -40,7 +40,7 @@ namespace Content.Client.GameObjects.Components.Observer
(new Control()
{
CustomMinimumSize = (20, 0)
MinSize = (20, 0)
}),
(DenyButton = new Button

View File

@@ -3,7 +3,7 @@
<RichTextLabel Name="Title" />
<HBoxContainer SeparationOverride="10">
<RichTextLabel Name="Description" SizeFlagsHorizontal="FillExpand" />
<RichTextLabel Name="Description" HorizontalExpand="True" />
<Button Name="RequestButton" Text="Request" TextAlign="Center" SizeFlagsHorizontal="ShrinkEnd" />
</HBoxContainer>
</VBoxContainer>

View File

@@ -1,10 +1,10 @@
<SS14Window Title="Ghost Roles"
xmlns="https://spacestation14.io">
<CenterContainer Name="NoRolesMessage" SizeFlagsVertical="FillExpand" SizeFlagsHorizontal="FillExpand">
xmlns="https://spacestation14.io" MinSize="350 275">
<CenterContainer Name="NoRolesMessage" VerticalExpand="True" HorizontalExpand="True">
<Label Text="There are currently no available ghost roles." />
</CenterContainer>
<ScrollContainer SizeFlagsHorizontal="FillExpand" SizeFlagsVertical="FillExpand">
<VBoxContainer Name="EntryContainer" SizeFlagsHorizontal="FillExpand" SizeFlagsVertical="FillExpand" />
<ScrollContainer HorizontalExpand="True" VerticalExpand="True">
<VBoxContainer Name="EntryContainer" HorizontalExpand="True" VerticalExpand="True" />
</ScrollContainer>
</SS14Window>

View File

@@ -12,8 +12,6 @@ namespace Content.Client.GameObjects.Components.Observer.GhostRoles
{
public event Action<uint> RoleRequested;
protected override Vector2 CalculateMinimumSize() => (350, 275);
public void ClearEntries()
{
EntryContainer.DisposeAllChildren();

View File

@@ -8,11 +8,11 @@
</HBoxContainer>
<HBoxContainer>
<Label Name="RoleNameLabel" Text="Role Name" />
<LineEdit Name="RoleName" SizeFlagsHorizontal="FillExpand" />
<LineEdit Name="RoleName" HorizontalExpand="True" />
</HBoxContainer>
<HBoxContainer>
<Label Name="RoleDescriptionLabel" Text="Role Description" />
<LineEdit Name="RoleDescription" SizeFlagsHorizontal="FillExpand" />
<LineEdit Name="RoleDescription" HorizontalExpand="True" />
</HBoxContainer>
<HBoxContainer>
<Label Name="MakeSentientLabel" Text="Make Sentient" />

View File

@@ -16,12 +16,12 @@ namespace Content.Client.GameObjects.Components.Observer.GhostRoles
{
RobustXamlLoader.Load(this);
MakeSentientLabel.CustomMinimumSize = (150, 0);
RoleEntityLabel.CustomMinimumSize = (150, 0);
RoleNameLabel.CustomMinimumSize = (150, 0);
RoleName.CustomMinimumSize = (300, 0);
RoleDescriptionLabel.CustomMinimumSize = (150, 0);
RoleDescription.CustomMinimumSize = (300, 0);
MakeSentientLabel.MinSize = (150, 0);
RoleEntityLabel.MinSize = (150, 0);
RoleNameLabel.MinSize = (150, 0);
RoleName.MinSize = (300, 0);
RoleDescriptionLabel.MinSize = (150, 0);
RoleDescription.MinSize = (300, 0);
MakeButton.OnPressed += OnPressed;
}