Some fixes

This commit is contained in:
2026-02-01 17:43:10 -06:00
parent 5fd2640bf8
commit f3c63fe95b
2 changed files with 3 additions and 8 deletions

View File

@@ -146,12 +146,9 @@ func (s *ScreenHome) Init(a *App) {
s.columns.AddAll(s.pdsListing, s.jsonContent) s.columns.AddAll(s.pdsListing, s.jsonContent)
//s.layout.AddAll(s.columns) s.layout.AddAll(s.columns)
//s.layout.SetLogger(s.Log)
//s.layout.SetWeight(s.columns, 4)
s.layout.Add(s.pdsListing)
s.layout.SetLogger(s.Log) s.layout.SetLogger(s.Log)
s.layout.SetWeight(s.pdsListing, 4) s.layout.SetWeight(s.columns, 4)
s.menuLayout.SetWidget(s.layout) s.menuLayout.SetWidget(s.layout)
s.layout.SetLogger(s.Log) s.layout.SetLogger(s.Log)
s.columns.SetLogger(s.Log) s.columns.SetLogger(s.Log)

View File

@@ -106,7 +106,6 @@ func (w *TreeBrowser) GetKeyMap() *t.KeyMap { return w.keyMap }
func (w *TreeBrowser) SetKeyMap(km *t.KeyMap) { w.keyMap = km } func (w *TreeBrowser) SetKeyMap(km *t.KeyMap) { w.keyMap = km }
func (w *TreeBrowser) HandleKey(ev *tcell.EventKey) bool { func (w *TreeBrowser) HandleKey(ev *tcell.EventKey) bool {
w.Log("TreeBrowser Handling Key: %s", ev.Name())
if !w.active || !w.focusable { if !w.active || !w.focusable {
return false return false
} }
@@ -142,7 +141,6 @@ func (w *TreeBrowser) Draw(screen tcell.Screen) {
break break
} }
} }
th.DrawText(x, y, fmt.Sprintf("Cursor: %d", w.cursor), w.style, screen)
} }
func (w *TreeBrowser) SetStyle(s tcell.Style) { w.style = s } func (w *TreeBrowser) SetStyle(s tcell.Style) { w.style = s }
@@ -330,7 +328,7 @@ func (tn *TreeNode) GetLabelPath() []string {
path = tn.parent.GetLabelPath() path = tn.parent.GetLabelPath()
} }
return append([]string{tn.Label()}, path...) return append(path, tn.Label())
} }
func (tn *TreeNode) getList() []string { func (tn *TreeNode) getList() []string {
pre := strings.Repeat("-", tn.Depth()) pre := strings.Repeat("-", tn.Depth())