background: Deprecate `shape_border_(width|color)`.

In favor of `border_width` and `border_color`.
This commit is contained in:
Emmanuel Lepage Vallee 2019-04-05 17:03:12 -04:00
parent eb1c45b656
commit c1596f0b4e
1 changed files with 27 additions and 4 deletions

View File

@ -15,6 +15,7 @@ local beautiful = require("beautiful")
local cairo = require("lgi").cairo local cairo = require("lgi").cairo
local gtable = require("gears.table") local gtable = require("gears.table")
local gshape = require("gears.shape") local gshape = require("gears.shape")
local gdebug = require("gears.debug")
local setmetatable = setmetatable local setmetatable = setmetatable
local type = type local type = type
local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility with Lua 5.1) local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility with Lua 5.1)
@ -282,8 +283,19 @@ function background:get_border_width()
return self._private.shape_border_width return self._private.shape_border_width
end end
background.get_shape_border_width = background.get_border_width function background.get_shape_border_width(...)
background.set_shape_border_width = background.set_border_width gdebug.deprecate("Use `border_width` instead of `shape_border_width`",
{deprecated_in=5})
return background.get_border_width(...)
end
function background.set_shape_border_width(...)
gdebug.deprecate("Use `border_width` instead of `shape_border_width`",
{deprecated_in=5})
background.set_border_width(...)
end
--- When a `shape` is set, also draw a border. --- When a `shape` is set, also draw a border.
-- --
@ -312,8 +324,19 @@ function background:get_border_color()
return self._private.shape_border_color return self._private.shape_border_color
end end
background.get_shape_border_color = background.get_border_color function background.get_shape_border_color(...)
background.set_shape_border_color = background.set_border_color gdebug.deprecate("Use `border_color` instead of `shape_border_color`",
{deprecated_in=5})
return background.get_border_color(...)
end
function background.set_shape_border_color(...)
gdebug.deprecate("Use `border_color` instead of `shape_border_color`",
{deprecated_in=5})
background.set_border_color(...)
end
function background:set_shape_clip(value) function background:set_shape_clip(value)
if value then return end if value then return end