From c0dc325c1b599719172590d36d8702d31b49c18d Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Fri, 10 May 2024 15:15:14 -0400 Subject: reduce indent depth --- gui/widget/tree.go | 4 +--- 1 file changed, 1 insertion(+), 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 -- cgit v1.2.3