tests: Test the separator widget
This commit is contained in:
parent
33124d8605
commit
9f6fed4e7b
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,36 @@
|
|||
local parent = ... --DOC_HIDE_ALL
|
||||
local wibox = require("wibox")
|
||||
|
||||
parent:add(
|
||||
wibox.widget {
|
||||
{
|
||||
{
|
||||
markup = "<b>orientation</b> = <i>horizontal</i>",
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
{
|
||||
orientation = "horizontal",
|
||||
widget = wibox.widget.separator,
|
||||
},
|
||||
forced_width = 200,
|
||||
layout = wibox.layout.fixed.vertical
|
||||
},
|
||||
{
|
||||
{
|
||||
markup = "<b>orientation</b> = <i>vertical</i>",
|
||||
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
|
|
@ -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
|
Loading…
Reference in New Issue