wibox.layout.rotate: Add some good constructor arguments

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2013-01-05 20:52:00 +01:00
parent ae69b2db03
commit 3a25e78224
1 changed files with 4 additions and 1 deletions

View File

@ -99,7 +99,7 @@ end
--- Returns a new rotate layout. A rotate layout rotates a given widget. Use --- Returns a new rotate layout. A rotate layout rotates a given widget. Use
-- :set_widget() to set the widget and :set_direction() for the direction. -- :set_widget() to set the widget and :set_direction() for the direction.
-- The default direction is "north" which doesn't change anything. -- The default direction is "north" which doesn't change anything.
local function new() local function new(widget, dir)
local ret = widget_base.make_widget() local ret = widget_base.make_widget()
for k, v in pairs(rotate) do for k, v in pairs(rotate) do
@ -112,6 +112,9 @@ local function new()
ret:emit_signal("widget::updated") ret:emit_signal("widget::updated")
end end
ret:set_widget(widget)
ret:set_direction(dir or "north")
return ret return ret
end end