--DOC_GEN_IMAGE --DOC_HIDE_START --DOC_NO_USAGE
local parent = ...
local wibox = require("wibox")
local gears = { shape = require("gears.shape")}
local beautiful = require( "beautiful" )
-- luacheck: push no max line length
local bg = [[
]]
local btn = [[
]]
--luacheck: pop
local function generic_widget(text, margins)
return wibox.widget {
{
{
{
id = "text",
align = "center",
valign = "center",
text = text,
widget = wibox.widget.textbox
},
margins = 10,
widget = wibox.container.margin,
},
border_width = 3,
border_color = beautiful.border_color,
bg = beautiful.bg_normal,
widget = wibox.container.background
},
margins = margins or 5,
widget = wibox.container.margin,
}
end
--DOC_HIDE_END
local w = wibox.widget {
{
{
text = "Content",
align = "center",
valign = "center",
widget = wibox.widget.textbox
},
border_widgets = {
top = {
{
{
{
stylesheet = "#bg1 {stop-color:#ca2b2b;} #bg2 {stop-color:#f8b9b9;}",
image = btn,
widget = wibox.widget.imagebox
},
{
stylesheet = "#bg1 {stop-color:#ec9527;} #bg2 {stop-color:#ffff9c;}",
image = btn,
widget = wibox.widget.imagebox
},
{
stylesheet = "#bg1 {stop-color:#75b525;} #bg2 {stop-color:#e0fda9;}",
image = btn,
widget = wibox.widget.imagebox
},
spacing = 3,
layout = wibox.layout.fixed.horizontal
},
{
align = "center",
text = "Shameless macOS ripoff",
widget = wibox.widget.textbox
},
layout = wibox.layout.align.horizontal
},
paddings = 6,
borders = 14,
border_image = bg,
honor_borders = false,
fill = true,
forced_height = 28, --DOC_HIDE
widget = wibox.container.border
},
right = generic_widget(""),
bottom_right = generic_widget(""),
bottom = generic_widget(""),
bottom_left = generic_widget(""),
left = generic_widget(""),
},
borders = {
top = 28,
left = 22,
right = 22,
bottom = 22,
},
border_merging = {
top = true
},
forced_width = 300, --DOC_HIDE
forced_height = 100, --DOC_HIDE
widget = wibox.container.border
},
bg = "#d9d9d9",
shape = gears.shape.rounded_rect,
widget = wibox.container.background
}
--DOC_HIDE_START
parent:add(w)
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80