beautiful.xresources.apply_dpi: use `math.ceil`
Closes https://github.com/awesomeWM/awesome/pull/330.
This commit is contained in:
parent
1f3ad814c9
commit
b28cda2ac6
|
@ -244,8 +244,8 @@ tooltip.new = function(args)
|
|||
self.background:set_fg(fg)
|
||||
|
||||
-- Add margin.
|
||||
local m_lr = args.margin_leftright or math.ceil(dpi(5))
|
||||
local m_tb = args.margin_topbottom or math.ceil(dpi(3))
|
||||
local m_lr = args.margin_leftright or dpi(5)
|
||||
local m_tb = args.margin_topbottom or dpi(3)
|
||||
self.marginbox = wibox.layout.margin(self.background, m_lr, m_lr, m_tb, m_tb)
|
||||
self.wibox:set_widget(self.marginbox)
|
||||
|
||||
|
|
|
@ -91,9 +91,9 @@ end
|
|||
--- Compute resulting size applying current DPI value (optionally per screen).
|
||||
-- @tparam number size Size
|
||||
-- @tparam[opt] integer s The screen.
|
||||
-- @treturn number Resulting size
|
||||
-- @treturn integer Resulting size (using `math.ceil`).
|
||||
function xresources.apply_dpi(size, s)
|
||||
return size/96*xresources.get_dpi(s)
|
||||
return math.ceil(size/96*xresources.get_dpi(s))
|
||||
end
|
||||
|
||||
return xresources
|
||||
|
|
Loading…
Reference in New Issue