diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-05-10 15:15:14 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-05-10 15:15:14 -0400 |
| commit | c0dc325c1b599719172590d36d8702d31b49c18d (patch) | |
| tree | 6db10f651bd7166fb99931d1e93a8ba9f783d549 /gui | |
| parent | 2a75e404af43ca8fa6e707d4506b41dad0ba1b83 (diff) | |
| download | volute-c0dc325c1b599719172590d36d8702d31b49c18d.zip | |
reduce indent depth
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/widget/tree.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gui/widget/tree.go b/gui/widget/tree.go index 633d440..9e4af13 100644 --- a/gui/widget/tree.go +++ b/gui/widget/tree.go @@ -9,8 +9,6 @@ import ( "volute/gui/layout" ) -const INDENT = 2 - type Node[T any] struct { Label string Value T @@ -53,7 +51,7 @@ func Tree[T any](trees []Node[T], r image.Rectangle, focus FocusSlave, mux *gui. func flatten[T any](root Node[T], depth int) []string { indent := string(populate( - make([]rune, INDENT*depth), + make([]rune, depth), '─')) nodes := []string{indent + root.Label} root.expanded = true // TODO: remove me |