Fix icon path and Y positioning

- Read icons/cut.png (not cut.png) to match embed directive
- Offset icon Y by iconSize so bottom aligns with text baseline
- drawText uses baseline positioning, drawPng uses top-left corner
This commit is contained in:
Greg Pomerantz 2026-05-10 07:10:02 -04:00
parent f259145084
commit 28c7253622

View File

@ -37,7 +37,7 @@ func New(th Theme, shp *text.Shaper) *Renderer {
// loadIcons loads PNG icons from the embedded filesystem. // loadIcons loads PNG icons from the embedded filesystem.
func (r *Renderer) loadIcons() { func (r *Renderer) loadIcons() {
data, err := iconFS.ReadFile("cut.png") data, err := iconFS.ReadFile("icons/cut.png")
if err != nil { if err != nil {
return return
} }