feat: Clamp thickness.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Dong Bin
2025-07-08 15:27:41 +08:00
committed by GitHub
parent 83e3756555
commit 8755209fa4

View File

@@ -10,7 +10,7 @@ public class TreeLevelToMarginConverter: IMultiValueConverter
{
if (values[0] is int i && values[1] is double indent)
{
return new Thickness((i-1) * indent, 0, 0, 0);
return new Thickness(Math.Max(i-1, 0) * indent, 0, 0, 0);
}
return new Thickness();
}