Fix BottomBar text positioning using op.Offset and remove debug logging

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
gmp
2026-05-08 18:45:24 -04:00
co-authored by Qwen-Coder
parent 4f4e50a13c
commit 1ae02d57fd
3 changed files with 16 additions and 34 deletions
-22
View File
@@ -67,11 +67,6 @@ 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)
@@ -89,20 +84,3 @@ 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"
}
}