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.
This commit is contained in:
PlayerNameHere 2020-09-28 00:00:08 +08:00
parent 2647e1c855
commit 45cfbe72bf
1 changed files with 8 additions and 0 deletions

View File

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