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:
Gregor Best 2009-07-19 22:01:15 +02:00 committed by Julien Danjou
parent 7c78e91a5b
commit 0d39054217
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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