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 margins = awful.widget.layout.margins
|
||||||
local layout = awful.widget.layout
|
local layout = awful.widget.layout
|
||||||
|
|
||||||
--module("awful.widget.layout.grid")
|
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
|
||||||
|
@ -79,7 +77,7 @@ end
|
||||||
|
|
||||||
-- Places the widgets in a grid.
|
-- Places the widgets in a grid.
|
||||||
-- @see awful.widget.layout for a luadoc
|
-- @see awful.widget.layout for a luadoc
|
||||||
local function grid(bounds, widgets, screen)
|
function M.grid(bounds, widgets, screen)
|
||||||
local widths = {}
|
local widths = {}
|
||||||
local heights = {}
|
local heights = {}
|
||||||
|
|
||||||
|
@ -197,7 +195,6 @@ local function grid(bounds, widgets, screen)
|
||||||
return geometries
|
return geometries
|
||||||
end
|
end
|
||||||
|
|
||||||
--setmetatable(_M, { __call = function(_, ...) return grid(...) end })
|
return M
|
||||||
return grid
|
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
-- 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.
|
-- @return A table of geometries of all the widgets.
|
||||||
-- @name grid
|
-- @name grid
|
||||||
-- @class function
|
-- @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
|
-- 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)
|
insert(geometries, v)
|
||||||
end
|
end
|
||||||
elseif type(v) == "widget" then
|
elseif type(v) == "widget" then
|
||||||
g = v:extents(screen)
|
local g = v:extents(screen)
|
||||||
|
|
||||||
-- resize to fit the width available if requested
|
-- resize to fit the width available if requested
|
||||||
if v.resize and g.width > 0 and g.height > 0 then
|
if v.resize and g.width > 0 and g.height > 0 then
|
||||||
|
|
Loading…
Reference in New Issue