awful.widget: few formal fixes for widget layouts
Signed-off-by: Lukas Hrazky <lukkash@email.cz> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
d5e3a25bbc
commit
717efb9ae4
|
@ -18,8 +18,6 @@ local clone = util.table.clone
|
|||
local margins = awful.widget.layout.margins
|
||||
local layout = awful.widget.layout
|
||||
|
||||
--module("awful.widget.layout.grid")
|
||||
|
||||
local M = {}
|
||||
|
||||
|
||||
|
@ -79,7 +77,7 @@ end
|
|||
|
||||
-- Places the widgets in a grid.
|
||||
-- @see awful.widget.layout for a luadoc
|
||||
local function grid(bounds, widgets, screen)
|
||||
function M.grid(bounds, widgets, screen)
|
||||
local widths = {}
|
||||
local heights = {}
|
||||
|
||||
|
@ -197,7 +195,6 @@ local function grid(bounds, widgets, screen)
|
|||
return geometries
|
||||
end
|
||||
|
||||
--setmetatable(_M, { __call = function(_, ...) return grid(...) end })
|
||||
return grid
|
||||
return M
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
|
@ -85,6 +85,6 @@ require("awful.widget.layout.vertical")
|
|||
-- @return A table of geometries of all the widgets.
|
||||
-- @name grid
|
||||
-- @class function
|
||||
grid = require("awful.widget.layout.grid")
|
||||
grid = require("awful.widget.layout.grid").grid
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
|
@ -245,7 +245,7 @@ function linear_common.flex(idx, bounds, widgets, screen)
|
|||
insert(geometries, v)
|
||||
end
|
||||
elseif type(v) == "widget" then
|
||||
g = v:extents(screen)
|
||||
local g = v:extents(screen)
|
||||
|
||||
-- resize to fit the width available if requested
|
||||
if v.resize and g.width > 0 and g.height > 0 then
|
||||
|
|
Loading…
Reference in New Issue