mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
fix(image): better cell size calculation for non-HDPI displays
This commit is contained in:
parent
4e13b24e99
commit
e146a66cb7
2 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue