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 capi = { image = image,
|
||||
widget = widget }
|
||||
local layout = require("awful.widget.layout")
|
||||
|
||||
--- A graph widget.
|
||||
module("awful.widget.graph")
|
||||
|
@ -221,6 +222,8 @@ function new(args)
|
|||
graph["set_" .. prop] = _M["set_" .. prop]
|
||||
end
|
||||
|
||||
graph.layout = args.layout or layout.horizontal.leftright
|
||||
|
||||
return graph
|
||||
end
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ local ipairs = ipairs
|
|||
local math = math
|
||||
local capi = { image = image,
|
||||
widget = widget }
|
||||
local layout = require("awful.widget.layout")
|
||||
|
||||
--- A progressbar widget.
|
||||
module("awful.widget.progressbar")
|
||||
|
@ -171,6 +172,8 @@ function new(args)
|
|||
pbar["set_" .. prop] = _M["set_" .. prop]
|
||||
end
|
||||
|
||||
pbar.layout = args.layout or layout.horizontal.leftright
|
||||
|
||||
return pbar
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue