Use original iconY position (30 DP) without offset

- User confirmed icon showed up at this position
- Icon renders in second row of status bar as intended
This commit is contained in:
Greg Pomerantz 2026-05-10 07:12:49 -04:00
parent 28c7253622
commit fdd1e841ae

View File

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