tests: Test the xresource theme logo generation

As a side effect, this creates valuable SVG assets
This commit is contained in:
Emmanuel Lepage Vallee 2016-12-11 00:05:50 -05:00
parent 12e1bd6747
commit beb997f848
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,19 @@
local parent = ... --DOC_HIDE
local wibox = require( "wibox" ) --DOC_HIDE
local beautiful = require( "beautiful" ) --DOC_HIDE
local assets = require( "xresources.assets" ) --DOC_HIDE
local color = require( "gears.color" ) --DOC_HIDE
local size = 128 --DOC_HIDE
parent:add( --DOC_HIDE
wibox.widget {
fit = function() return 128, 128 end,
draw = function(_, _, cr)
assets.gen_logo(cr, 128, 128, nil, "#535d6c")
end,
widget = wibox.widget.base.make_widget
}
) --DOC_HIDE

View File

@ -0,0 +1,21 @@
local parent = ... --DOC_HIDE
local wibox = require( "wibox" ) --DOC_HIDE
local beautiful = require( "beautiful" ) --DOC_HIDE
local assets = require( "xresources.assets" ) --DOC_HIDE
local color = require( "gears.color" ) --DOC_HIDE
local size = 128 --DOC_HIDE
parent:add( --DOC_HIDE
wibox.widget {
fit = function() return 148, 128 end,
draw = function(_, _, cr)
assets.gen_logo(cr, 128, 128, nil, "#535d6c")
cr:translate(128 + 128/16, 0)
assets.gen_awesome_name(cr, 0, 158, nil, "#535d6c", alt_fg, true)
end,
widget = wibox.widget.base.make_widget
}
) --DOC_HIDE