Fix icon Y positioning: offset by icon height to align bottom with baseline

- drawText positions glyphs by baseline, drawPng uses top-left corner
- Subtract iconSize from iconY so icon bottom aligns with text baseline
- Icon now renders within status bar instead of overlapping top
This commit is contained in:
Greg Pomerantz 2026-05-10 07:03:43 -04:00
parent 0ac2941802
commit f259145084
2 changed files with 10 additions and 1 deletions

7
.qwen/settings.json Normal file
View File

@ -0,0 +1,7 @@
{
"permissions": {
"allow": [
"Bash(pkill *)"
]
}
}

View File

@ -181,7 +181,9 @@ func (r *Renderer) drawStatusBar(gtx layout.Context, sb StatusBar, _ WindowConst
iconY := iconsLineY
iconSize := Dp(16)
r.drawPng(gtx, r.icons["cut"], leftX, iconY, iconSize, iconSize, color.NRGBA{R: 0, G: 0, B: 0, A: 255})
// Icon Y is baseline position; drawPng uses top-left, so offset by icon height
iconDrawY := iconY - iconSize
r.drawPng(gtx, r.icons["cut"], leftX, iconDrawY, iconSize, iconSize, color.NRGBA{R: 0, G: 0, B: 0, A: 255})
leftX += Dp(36)
r.drawText(gtx, th.Shaper, "⎘", r.theme.FontSize, leftX, iconY, color.NRGBA{R: 0, G: 0, B: 0, A: 255})
leftX += Dp(36)