Use awful.util.round in beautiful.xresources.apply_dpi

This commit is contained in:
Daniel Hahler 2015-08-12 14:18:57 +02:00
parent fe235b7fb7
commit 11473aa490
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@
-- Grab environment
local print = print
local awesome = awesome
local floor = math.floor
local round = require("awful.util").round
local xresources = {}
@ -94,7 +94,7 @@ end
-- @tparam[opt] integer s The screen.
-- @treturn integer Resulting size (rounded to integer).
function xresources.apply_dpi(size, s)
return floor(size/96*xresources.get_dpi(s) + 0.5)
return round(size / 96 * xresources.get_dpi(s))
end
return xresources