wibox.layout.*: add get direction method
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
af756bb0d1
commit
2f3bc619cb
|
@ -105,6 +105,7 @@ local function get_layout(dir)
|
||||||
local ret = widget_base.make_widget()
|
local ret = widget_base.make_widget()
|
||||||
ret.draw = draw_dir
|
ret.draw = draw_dir
|
||||||
ret.fit = function(box, ...) return ... end
|
ret.fit = function(box, ...) return ... end
|
||||||
|
ret.get_dir = function () return dir end
|
||||||
ret._emit_updated = function()
|
ret._emit_updated = function()
|
||||||
ret:emit_signal("widget::updated")
|
ret:emit_signal("widget::updated")
|
||||||
end
|
end
|
||||||
|
|
|
@ -132,6 +132,7 @@ local function get_layout(dir)
|
||||||
ret.reset = reset
|
ret.reset = reset
|
||||||
ret.fill_space = fill_space
|
ret.fill_space = fill_space
|
||||||
ret.widgets = {}
|
ret.widgets = {}
|
||||||
|
ret.get_dir = function () return dir end
|
||||||
ret._emit_updated = function()
|
ret._emit_updated = function()
|
||||||
ret:emit_signal("widget::updated")
|
ret:emit_signal("widget::updated")
|
||||||
end
|
end
|
||||||
|
|
|
@ -85,6 +85,7 @@ local function get_layout(dir)
|
||||||
ret.add = add
|
ret.add = add
|
||||||
ret.reset = reset
|
ret.reset = reset
|
||||||
ret.widgets = {}
|
ret.widgets = {}
|
||||||
|
ret.get_dir = function () return dir end
|
||||||
ret._emit_updated = function()
|
ret._emit_updated = function()
|
||||||
ret:emit_signal("widget::updated")
|
ret:emit_signal("widget::updated")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue