From 45cfbe72bfd535ae532c1c12d7c342a0426c8b6d Mon Sep 17 00:00:00 2001 From: PlayerNameHere Date: Mon, 28 Sep 2020 00:00:08 +0800 Subject: [PATCH] Add getters for wibox.layout.stack offset properties Getters for the horizontal_offset and vertical_offset properties were missing, which resulted in nil when trying to get them. --- lib/wibox/layout/stack.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/wibox/layout/stack.lua b/lib/wibox/layout/stack.lua index 792e47b1c..6f3cd92a9 100644 --- a/lib/wibox/layout/stack.lua +++ b/lib/wibox/layout/stack.lua @@ -174,12 +174,20 @@ function stack:set_horizontal_offset(value) self:emit_signal("property::horizontal_offset", value) end +function stack:get_horizontal_offset() + return self._private.h_offset +end + function stack:set_vertical_offset(value) self._private.v_offset = value self:emit_signal("widget::layout_changed") self:emit_signal("property::vertical_offset", value) end +function stack:get_vertical_offset() + return self._private.v_offset +end + --- Create a new stack layout. -- -- @constructorfct wibox.layout.stack