aboutsummaryrefslogtreecommitdiffstats
path: root/gui/widget
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-05-10 15:15:14 -0400
committerSam Anthony <sam@samanthony.xyz>2024-05-10 15:15:14 -0400
commitc0dc325c1b599719172590d36d8702d31b49c18d (patch)
tree6db10f651bd7166fb99931d1e93a8ba9f783d549 /gui/widget
parent2a75e404af43ca8fa6e707d4506b41dad0ba1b83 (diff)
downloadvolute-c0dc325c1b599719172590d36d8702d31b49c18d.zip
reduce indent depth
Diffstat (limited to 'gui/widget')
-rw-r--r--gui/widget/tree.go4
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