fix(ui): align TreeView node text by giving toggle and spacer equal fixed width

This commit is contained in:
Joseph Doherty
2026-03-23 10:29:19 -04:00
parent 0abaa47de2
commit 5e2a4c9080

View File

@@ -41,11 +41,11 @@ else
@oncontextmenu="(e) => OnContextMenu(e, item)" @oncontextmenu:preventDefault="@(ContextMenu != null)">
@if (isBranch)
{
<span class="tv-toggle" @onclick="() => ToggleExpand(key)" @onclick:stopPropagation>@(isExpanded ? "\u2212" : "+")</span>
<span class="tv-toggle" style="display:inline-block;width:1.2em;text-align:center;cursor:pointer;" @onclick="() => ToggleExpand(key)" @onclick:stopPropagation>@(isExpanded ? "\u2212" : "+")</span>
}
else
{
<span class="tv-spacer"></span>
<span class="tv-spacer" style="display:inline-block;width:1.2em;"></span>
}
<span class="tv-content" @onclick="() => OnContentClick(key)" @onclick:stopPropagation>
@NodeContent(item)