--DOC_GEN_IMAGE --DOC_HIDE_START
local parent = ...
local wibox = require("wibox")
-- luacheck: push no max string line length
local image_path = [[
]]
--luacheck: pop
local l = wibox.layout {
forced_width = 240,
spacing = 5,
layout = wibox.layout.fixed.vertical
}
l:add(wibox.widget {
markup = "Original image:",
widget = wibox.widget.textbox,
})
l:add(wibox.widget {
image = image_path,
forced_height = 48,
forced_width = 48,
widget = wibox.widget.imagebox,
})
for _, fill in ipairs {true, false} do
--DOC_HIDE_END
local w = wibox.widget {
{
text = "Central widget",
valign = "center",
align = "center",
forced_height = 30,
forced_width = 30,
widget = wibox.widget.textbox
},
borders = 10,
border_image = image_path,
fill = fill,
widget = wibox.container.border
}
--DOC_HIDE_START
l:add(wibox.widget {
{
markup = "`fill` = "..(fill and "true" or "false").."",
widget = wibox.widget.textbox,
},
w,
layout = wibox.layout.fixed.vertical,
})
end
parent:add(l)
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80