diff --git a/lib/wibox/container/margin.lua b/lib/wibox/container/margin.lua index 8d7b9143..70924007 100644 --- a/lib/wibox/container/margin.lua +++ b/lib/wibox/container/margin.lua @@ -1,4 +1,6 @@ --------------------------------------------------------------------------- +-- +--@DOC_wibox_container_defaults_margin_EXAMPLE@ -- @author Uli Schlachter -- @copyright 2010 Uli Schlachter -- @release @AWESOME_VERSION@ diff --git a/tests/examples/wibox/container/defaults/margin.lua b/tests/examples/wibox/container/defaults/margin.lua new file mode 100644 index 00000000..49505b07 --- /dev/null +++ b/tests/examples/wibox/container/defaults/margin.lua @@ -0,0 +1,54 @@ +--DOC_HIDE_ALL +local wibox = require("wibox") +local beautiful = require("beautiful") + +return { + nil, + { + nil, + { + { + text = "Before", + align = "center", + valign = "center", + widget = wibox.widget.textbox, + }, + bg = beautiful.bg_highlight, + widget = wibox.container.background + }, + nil, + expand = "none", + layout = wibox.layout.align.horizontal, + }, + nil, + expand = "none", + layout = wibox.layout.align.vertical, +}, +{ + nil, + { + nil, + { + { + { + text = "After", + align = "center", + valign = "center", + widget = wibox.widget.textbox, + }, + bg = beautiful.bg_highlight, + widget = wibox.container.background + }, + top = 5, + left = 20, + color = "#ff0000", + widget = wibox.container.margin, + }, + nil, + expand = "none", + layout = wibox.layout.align.horizontal, + }, + nil, + expand = "none", + layout = wibox.layout.align.vertical, +}