widget.graph/progressbar: add layout parameter to new()
Signed-off-by: Gregor Best <gbe@intepi.net> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
7c78e91a5b
commit
0d39054217
|
@ -10,6 +10,7 @@ local math = math
|
||||||
local table = table
|
local table = table
|
||||||
local capi = { image = image,
|
local capi = { image = image,
|
||||||
widget = widget }
|
widget = widget }
|
||||||
|
local layout = require("awful.widget.layout")
|
||||||
|
|
||||||
--- A graph widget.
|
--- A graph widget.
|
||||||
module("awful.widget.graph")
|
module("awful.widget.graph")
|
||||||
|
@ -221,6 +222,8 @@ function new(args)
|
||||||
graph["set_" .. prop] = _M["set_" .. prop]
|
graph["set_" .. prop] = _M["set_" .. prop]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
graph.layout = args.layout or layout.horizontal.leftright
|
||||||
|
|
||||||
return graph
|
return graph
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ local ipairs = ipairs
|
||||||
local math = math
|
local math = math
|
||||||
local capi = { image = image,
|
local capi = { image = image,
|
||||||
widget = widget }
|
widget = widget }
|
||||||
|
local layout = require("awful.widget.layout")
|
||||||
|
|
||||||
--- A progressbar widget.
|
--- A progressbar widget.
|
||||||
module("awful.widget.progressbar")
|
module("awful.widget.progressbar")
|
||||||
|
@ -171,6 +172,8 @@ function new(args)
|
||||||
pbar["set_" .. prop] = _M["set_" .. prop]
|
pbar["set_" .. prop] = _M["set_" .. prop]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
pbar.layout = args.layout or layout.horizontal.leftright
|
||||||
|
|
||||||
return pbar
|
return pbar
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue