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:
parent
0ac2941802
commit
f259145084
7
.qwen/settings.json
Normal file
7
.qwen/settings.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"permissions": {
|
||||||
|
"allow": [
|
||||||
|
"Bash(pkill *)"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -181,7 +181,9 @@ func (r *Renderer) drawStatusBar(gtx layout.Context, sb StatusBar, _ WindowConst
|
||||||
iconY := iconsLineY
|
iconY := iconsLineY
|
||||||
|
|
||||||
iconSize := Dp(16)
|
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)
|
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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user