progressbar: keep set_height/set_width working (#1141)

Ref: https://github.com/awesomeWM/awesome/issues/1140
This commit is contained in:
Daniel Hahler 2016-10-05 00:24:43 +02:00 committed by GitHub
parent 26d3c5eb1a
commit 332681aaad
1 changed files with 10 additions and 8 deletions

View File

@ -382,21 +382,23 @@ function progressbar:set_max_value(max_value)
end
--- Set the progressbar height.
-- This method is deprecated, it no longer do anything.
-- Use a `wibox.container.constraint` widget or `forced_height`.
-- This method is deprecated. Use a `wibox.container.constraint` widget or
-- `forced_height`.
-- @param height The height to set.
-- @deprecated set_height
function progressbar:set_height(height) --luacheck: no unused_args
util.deprecate("Use a `wibox.container.constraint` widget or forced_height")
function progressbar:set_height(height)
util.deprecate("Use a `wibox.container.constraint` widget or `forced_height`")
self:set_forced_height(height)
end
--- Set the progressbar width.
-- This method is deprecated, it no longer do anything.
-- Use a `wibox.container.constraint` widget or `forced_width`.
-- This method is deprecated. Use a `wibox.container.constraint` widget or
-- `forced_width`.
-- @param width The width to set.
-- @deprecated set_width
function progressbar:set_width(width) --luacheck: no unused_args
util.deprecate("Use a `wibox.container.constraint` widget or forced_width")
function progressbar:set_width(width)
util.deprecate("Use a `wibox.container.constraint` widget or `forced_width`")
self:set_forced_width(width)
end
-- Build properties function