tweak some node spacing
This commit is contained in:
@@ -13,7 +13,7 @@ namespace FlaxEditor.Surface
|
||||
/// <summary>
|
||||
/// The node close button size.
|
||||
/// </summary>
|
||||
public const float NodeCloseButtonSize = 12.0f;
|
||||
public const float NodeCloseButtonSize = 16.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The node close button margin from the edges.
|
||||
@@ -25,6 +25,9 @@ namespace FlaxEditor.Surface
|
||||
/// </summary>
|
||||
public const float NodeHeaderHeight = 20.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The scale of the header text.
|
||||
/// </summary>
|
||||
public const float NodeHeaderTextScale = 0.65f;
|
||||
|
||||
/// <summary>
|
||||
@@ -33,14 +36,14 @@ namespace FlaxEditor.Surface
|
||||
public const float NodeFooterSize = 2.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The node left margin.
|
||||
/// The horizontal node margin.
|
||||
/// </summary>
|
||||
public const float NodeMarginX = 8.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The node right margin.
|
||||
/// The vertical node right margin.
|
||||
/// </summary>
|
||||
public const float NodeMarginY = 5.0f;
|
||||
public const float NodeMarginY = 7.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The box position offset on the x axis.
|
||||
@@ -50,7 +53,7 @@ namespace FlaxEditor.Surface
|
||||
/// <summary>
|
||||
/// The width of the row that is started by a box.
|
||||
/// </summary>
|
||||
public const float BoxRowHeight = 18.0f;
|
||||
public const float BoxRowHeight = 19.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The box size (with and height).
|
||||
@@ -60,7 +63,7 @@ namespace FlaxEditor.Surface
|
||||
/// <summary>
|
||||
/// The node layout offset on the y axis (height of the boxes rows, etc.). It's used to make the design more consistent.
|
||||
/// </summary>
|
||||
public const float LayoutOffsetY = 22.0f;
|
||||
public const float LayoutOffsetY = 24.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The offset between the box text and the box
|
||||
@@ -70,6 +73,11 @@ namespace FlaxEditor.Surface
|
||||
/// <summary>
|
||||
/// The width of the rectangle used to draw the box text.
|
||||
/// </summary>
|
||||
public const float BoxTextRectWidth = 1410.0f;
|
||||
public const float BoxTextRectWidth = 500.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The scale of text of boxes.
|
||||
/// </summary>
|
||||
public const float BoxTextScale = 1.175f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1443,7 +1443,7 @@ namespace FlaxEditor.Surface.Elements
|
||||
// Draw text
|
||||
var style = Style.Current;
|
||||
var rect = new Rectangle(Width + Constants.BoxTextOffset, 0, Constants.BoxTextRectWidth, Height);
|
||||
Render2D.DrawText(style.FontSmall, Text, rect, Enabled ? style.Foreground : style.ForegroundDisabled, TextAlignment.Near, TextAlignment.Center);
|
||||
Render2D.DrawText(style.FontMedium, Text, rect, Enabled ? style.Foreground : style.ForegroundDisabled, TextAlignment.Near, TextAlignment.Center, TextWrapping.NoWrap, 1f, Constants.BoxTextScale);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -235,7 +235,7 @@ namespace FlaxEditor.Surface.Elements
|
||||
// Draw text
|
||||
var style = Style.Current;
|
||||
var rect = new Rectangle(-Constants.BoxTextRectWidth - Constants.BoxTextOffset, 0, Constants.BoxTextRectWidth, Height);
|
||||
Render2D.DrawText(style.FontSmall, Text, rect, Enabled ? style.Foreground : style.ForegroundDisabled, TextAlignment.Far, TextAlignment.Center);
|
||||
Render2D.DrawText(style.FontMedium, Text, rect, Enabled ? style.Foreground : style.ForegroundDisabled, TextAlignment.Far, TextAlignment.Center, TextWrapping.NoWrap, 1f, Constants.BoxTextScale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user