fix(composite): don't draw partially off-screen images (prevents sticky images on scroll)
This commit is contained in:
@@ -273,11 +273,11 @@ func (cc *compositeContent) drawImage(ctx *ui.Context, idx, row, width, height i
|
|||||||
graphic.Resize(width, height)
|
graphic.Resize(width, height)
|
||||||
}
|
}
|
||||||
|
|
||||||
startRow := row
|
// Only draw when fully on-screen — partial placement causes sticky images
|
||||||
if startRow < 0 {
|
if row < 0 || row+height > ctx.Height() {
|
||||||
startRow = 0
|
return
|
||||||
}
|
}
|
||||||
win := ctx.Window().New(0, startRow, width, height)
|
win := ctx.Window().New(0, row, width, height)
|
||||||
graphic.Draw(win)
|
graphic.Draw(win)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user