From 11473aa49071866c15da6f46dec82081182fa123 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 12 Aug 2015 14:18:57 +0200 Subject: [PATCH] Use awful.util.round in beautiful.xresources.apply_dpi --- lib/beautiful/xresources.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/beautiful/xresources.lua b/lib/beautiful/xresources.lua index ba945f2b6..1fb098cad 100644 --- a/lib/beautiful/xresources.lua +++ b/lib/beautiful/xresources.lua @@ -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