Remove debug code from renderer

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Greg Pomerantz 2026-05-08 17:35:25 -04:00
parent aa422ab541
commit 4f4e50a13c
2 changed files with 22 additions and 0 deletions

View File

@ -67,6 +67,11 @@ func run(w *app.Window) error {
currentElems := elems
mu.Unlock()
log.Println("FrameEvent: rendering", len(currentElems), "elements")
for i, elem := range currentElems {
log.Println(" Element", i, "type:", typeOf(elem))
}
gtx := app.NewContext(&ops, e)
renderer.Draw(gtx, currentElems)
e.Frame(&ops)
@ -84,3 +89,20 @@ func frameReceiver(w *app.Window, mu *sync.Mutex, elems *[]ui.Element, frameChan
mu.Unlock()
}
}
func typeOf(v any) string {
switch v.(type) {
case ui.Label:
return "Label"
case ui.ListView:
return "ListView"
case ui.StatusBar:
return "StatusBar"
case ui.BottomBar:
return "BottomBar"
case ui.Button:
return "Button"
default:
return "Unknown"
}
}

BIN
pad

Binary file not shown.