libs: use geometry instead of coords
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
208b3955ce
commit
4eb096e236
|
@ -117,10 +117,10 @@ function update(c, prop)
|
|||
if data[c].width then
|
||||
if c.titlebar.position == "top"
|
||||
or c.titlebar.position == "bottom" then
|
||||
local w = math.min(data[c].width, c:coords().width + 2 * c.border_width)
|
||||
local w = math.min(data[c].width, c:geometry().width + 2 * c.border_width)
|
||||
c.titlebar:geometry({ width = w })
|
||||
else
|
||||
local w = math.min(data[c].width, c:coords().height + 2 * c.border_width)
|
||||
local w = math.min(data[c].width, c:geometry().height + 2 * c.border_width)
|
||||
c.titlebar:geometry({ height = w })
|
||||
end
|
||||
end
|
||||
|
|
|
@ -452,8 +452,8 @@ end
|
|||
|
||||
function run(args)
|
||||
gamedata.screen = capi.screen[capi.mouse.screen]
|
||||
gamedata.field.x = gamedata.screen.coords.x + math.floor((gamedata.screen.coords.width - gamedata.field.w) / 2)
|
||||
gamedata.field.y = gamedata.screen.coords.y + math.floor((gamedata.screen.coords.height - gamedata.field.h) / 2)
|
||||
gamedata.field.x = gamedata.screen.geometry.x + math.floor((gamedata.screen.geometry.width - gamedata.field.w) / 2)
|
||||
gamedata.field.y = gamedata.screen.geometry.y + math.floor((gamedata.screen.geometry.height - gamedata.field.h) / 2)
|
||||
|
||||
if args then
|
||||
if args['x'] then gamedata.field.x = args['x'] end
|
||||
|
|
|
@ -87,7 +87,7 @@ notifications = {
|
|||
}
|
||||
|
||||
local ws = capi.screen[config.screen].workarea
|
||||
local ss = capi.screen[config.screen].coords
|
||||
local ss = capi.screen[config.screen].geometry
|
||||
|
||||
--- Evaluate desired position of the notification by index - internal
|
||||
-- @param idx Index of the notification
|
||||
|
|
Loading…
Reference in New Issue