Fix various editor labels placement after UI resizing refactor

#3317
This commit is contained in:
Wojtek Figat
2025-03-31 15:35:32 +02:00
parent bf849c860a
commit 368ef9185b
3 changed files with 6 additions and 3 deletions

View File

@@ -221,6 +221,7 @@ namespace FlaxEditor.Windows.Assets
{ {
Text = $"{Asset.DataTypeName}", Text = $"{Asset.DataTypeName}",
TooltipText = "Asset data type (full name)", TooltipText = "Asset data type (full name)",
Pivot = Float2.Zero,
AnchorPreset = AnchorPresets.TopRight, AnchorPreset = AnchorPresets.TopRight,
AutoWidth = true, AutoWidth = true,
Parent = this, Parent = this,

View File

@@ -391,6 +391,7 @@ namespace FlaxEditor.Windows
VerticalAlignment = TextAlignment.Near, VerticalAlignment = TextAlignment.Near,
HorizontalAlignment = TextAlignment.Near, HorizontalAlignment = TextAlignment.Near,
Offsets = Margin.Zero, Offsets = Margin.Zero,
Pivot = Float2.Zero,
}; };
// Entries panel // Entries panel

View File

@@ -110,7 +110,7 @@ namespace FlaxEditor.Windows
AnchorPreset = AnchorPresets.TopRight, AnchorPreset = AnchorPresets.TopRight,
Text = versionString, Text = versionString,
Parent = this, Parent = this,
Bounds = new Rectangle(Width - 140 - margin - xOffset, margin, 140, 14), Bounds = new Rectangle(Width - 140 - margin, margin, 140, 14),
}; };
string url = null; string url = null;
@@ -130,7 +130,7 @@ namespace FlaxEditor.Windows
AnchorPreset = AnchorPresets.TopRight, AnchorPreset = AnchorPresets.TopRight,
Text = desc.Author, Text = desc.Author,
Parent = this, Parent = this,
Bounds = new Rectangle(Width - authorWidth - margin - xOffset, versionLabel.Bottom + margin, authorWidth, 14), Bounds = new Rectangle(Width - authorWidth - margin, versionLabel.Bottom + margin, authorWidth, 14),
}; };
if (url != null) if (url != null)
{ {
@@ -245,6 +245,7 @@ namespace FlaxEditor.Windows
Text = "Name", Text = "Name",
HorizontalAlignment = TextAlignment.Near, HorizontalAlignment = TextAlignment.Near,
}; };
nameLabel.LocalX -= 10;
nameLabel.LocalY += 10; nameLabel.LocalY += 10;
var nameTextBox = new TextBox var nameTextBox = new TextBox
@@ -291,7 +292,7 @@ namespace FlaxEditor.Windows
Text = "Git Path", Text = "Git Path",
HorizontalAlignment = TextAlignment.Near, HorizontalAlignment = TextAlignment.Near,
}; };
gitPathLabel.LocalX += (300 - gitPathLabel.Width) * 0.5f; gitPathLabel.LocalX += (250 - gitPathLabel.Width) * 0.5f;
gitPathLabel.LocalY += 35; gitPathLabel.LocalY += 35;
var gitPathTextBox = new TextBox var gitPathTextBox = new TextBox