wibox.layout.rotate: Add some good constructor arguments
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
ae69b2db03
commit
3a25e78224
|
@ -99,7 +99,7 @@ end
|
|||
--- 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.
|
||||
-- The default direction is "north" which doesn't change anything.
|
||||
local function new()
|
||||
local function new(widget, dir)
|
||||
local ret = widget_base.make_widget()
|
||||
|
||||
for k, v in pairs(rotate) do
|
||||
|
@ -112,6 +112,9 @@ local function new()
|
|||
ret:emit_signal("widget::updated")
|
||||
end
|
||||
|
||||
ret:set_widget(widget)
|
||||
ret:set_direction(dir or "north")
|
||||
|
||||
return ret
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue