diff --git a/lib/wibox/container/background.lua b/lib/wibox/container/background.lua index 4e30042b4..c4ee51ff8 100644 --- a/lib/wibox/container/background.lua +++ b/lib/wibox/container/background.lua @@ -268,20 +268,16 @@ function background:get_shape_border_color() return self._private.shape_border_color end ---- When a `shape` is set, make sure nothing is drawn outside of it. ---@DOC_wibox_container_background_clip_EXAMPLE@ --- @property shape_clip --- @tparam boolean value If the shape clip is enable - function background:set_shape_clip(value) - if self._private.shape_clip == value then return end - - self._private.shape_clip = value - self:emit_signal("widget::redraw_needed") + if value then return end + require("gears.debug").print_warning("shape_clip property of background container was removed." + .. " Use wibox.layout.stack instead if you want shape_clip=false.") end function background:get_shape_clip() - return self._private.shape_clip or false + require("gears.debug").print_warning("shape_clip property of background container was removed." + .. " Use wibox.layout.stack instead if you want shape_clip=false.") + return true end --- The background image to use diff --git a/tests/examples/wibox/container/background/clip.lua b/tests/examples/wibox/container/background/clip.lua deleted file mode 100644 index 0e7d84c7c..000000000 --- a/tests/examples/wibox/container/background/clip.lua +++ /dev/null @@ -1,35 +0,0 @@ ---DOC_GEN_IMAGE --DOC_HIDE -local parent = ... --DOC_HIDE -local wibox = require("wibox") --DOC_HIDE -local gears = {shape = require("gears.shape")} --DOC_HIDE -local beautiful = require("beautiful") --DOC_HIDE - -parent : setup { - { - -- Some content may be outside of the shape - { - text = "Hello\nworld!", - widget = wibox.widget.textbox - }, - shape = gears.shape.circle, - bg = beautiful.bg_normal, - shape_border_color = beautiful.border_color, - widget = wibox.container.background - }, - { - -- To solve this, clip the content - { - text = "Hello\nworld!", - widget = wibox.widget.textbox - }, - shape_clip = true, - shape = gears.shape.circle, - bg = beautiful.bg_normal, - shape_border_color = beautiful.border_color, - widget = wibox.container.background - }, - spacing = 10, - layout = wibox.layout.fixed.vertical -} - ---DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80