Fix Content Window navigation bar to expand toolstrip for proper scroll bar display

#3326
This commit is contained in:
Wojtek Figat
2025-08-25 14:38:55 +02:00
parent 6fea9eefaa
commit b965ca6c8c
5 changed files with 83 additions and 20 deletions

View File

@@ -543,11 +543,12 @@ namespace FlaxEditor.Surface
nodes.Add(context);
context = context.Parent;
}
float margin = 1;
float x = NavigationBar.DefaultButtonsMargin;
float h = toolStrip.ItemsHeight - 2 * ToolStrip.DefaultMarginV;
float h = toolStrip.ItemsHeight - 2 * margin;
for (int i = nodes.Count - 1; i >= 0; i--)
{
var button = new VisjectContextNavigationButton(this, nodes[i].Context, x, ToolStrip.DefaultMarginV, h);
var button = new VisjectContextNavigationButton(this, nodes[i].Context, x, margin, h);
button.PerformLayout();
x += button.Width + NavigationBar.DefaultButtonsMargin;
navigationBar.AddChild(button);