fix(image): better cell size calculation for non-HDPI displays

This commit is contained in:
Folke Lemaitre 2025-02-19 15:07:27 +01:00
parent 4e13b24e99
commit e146a66cb7
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 5 additions and 5 deletions

View file

@ -39,8 +39,8 @@ end
---@return snacks.image.Size
function M.norm(size)
return {
width = math.max(1, math.floor(size.width + 0.5)),
height = math.max(1, math.floor(size.height + 0.5)),
width = math.max(1, math.ceil(size.width)),
height = math.max(1, math.ceil(size.height)),
}
end