diff --git a/tests/examples/wibox/widget/defaults/separator.lua b/tests/examples/wibox/widget/defaults/separator.lua new file mode 100644 index 000000000..6580e0599 --- /dev/null +++ b/tests/examples/wibox/widget/defaults/separator.lua @@ -0,0 +1,13 @@ +local parent = ... --DOC_HIDE +local wibox = require( "wibox" ) --DOC_HIDE + +parent:add( --DOC_HIDE + +wibox.widget { + forced_height = 20, --DOC_HIDE + forced_width = 100, --DOC_HIDE + widget = wibox.widget.separator +} + +) --DOC_HIDE +--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/tests/examples/wibox/widget/separator/border_color.lua b/tests/examples/wibox/widget/separator/border_color.lua new file mode 100644 index 000000000..3228a1bf4 --- /dev/null +++ b/tests/examples/wibox/widget/separator/border_color.lua @@ -0,0 +1,18 @@ +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:add( --DOC_HIDE +wibox.widget { + shape = gears.shape.circle, + color = "#00000000", + border_width = 1, + border_color = beautiful.bg_normal, + widget = wibox.widget.separator, + forced_height = 20, --DOC_HIDE + forced_width = 20, --DOC_HIDE +} +) --DOC_HIDE + +--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/tests/examples/wibox/widget/separator/orientation.lua b/tests/examples/wibox/widget/separator/orientation.lua new file mode 100644 index 000000000..eb42f8fd3 --- /dev/null +++ b/tests/examples/wibox/widget/separator/orientation.lua @@ -0,0 +1,36 @@ +local parent = ... --DOC_HIDE_ALL +local wibox = require("wibox") + +parent:add( +wibox.widget { + { + { + markup = "orientation = horizontal", + widget = wibox.widget.textbox + }, + { + orientation = "horizontal", + widget = wibox.widget.separator, + }, + forced_width = 200, + layout = wibox.layout.fixed.vertical + }, + { + { + markup = "orientation = vertical", + widget = wibox.widget.textbox + }, + { + orientation = "vertical", + widget = wibox.widget.separator, + }, + forced_width = 200, + layout = wibox.layout.fixed.vertical + }, + forced_height = 30, + forced_width = 400, + layout = wibox.layout.fixed.horizontal +} +) + +--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/tests/examples/wibox/widget/separator/shape.lua b/tests/examples/wibox/widget/separator/shape.lua new file mode 100644 index 000000000..823701dd6 --- /dev/null +++ b/tests/examples/wibox/widget/separator/shape.lua @@ -0,0 +1,23 @@ +local parent = ... --DOC_HIDE +local wibox = require("wibox") --DOC_HIDE +local gears = {shape = require("gears.shape")}--DOC_HIDE + +local wdgs = { --DOC_HIDE + forced_height = 30, --DOC_HIDE + forced_width = 30*4, --DOC_HIDE + spacing = 5, --DOC_HIDE + layout = wibox.layout.flex.horizontal --DOC_HIDE +} --DOC_HIDE + + +for _, s in ipairs { "losange" ,"circle", "isosceles_triangle", "cross" } do + local w = wibox.widget { + shape = gears.shape[s], + widget = wibox.widget.separator, + } + table.insert(wdgs, w) --DOC_HIDE +end + +parent:add( wibox.layout(wdgs)) --DOC_HIDE + +--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80