example tests: Switch to new API
This makes the templates used by the example tests use the new API added in the previous commit. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
6de6419180
commit
0abfed54de
|
@ -3,7 +3,6 @@ require("_common_template")(...)
|
|||
|
||||
local beautiful = require( "beautiful" )
|
||||
local wibox = require( "wibox" )
|
||||
local surface = require( "gears.surface" )
|
||||
local shape = require( "gears.shape" )
|
||||
|
||||
-- Let the test request a size and file format
|
||||
|
@ -72,7 +71,6 @@ end
|
|||
local f_w, f_h = container:fit({dpi=96}, 9999, 9999)
|
||||
|
||||
-- Save to the output file
|
||||
local img = surface.widget_to_svg(container, image_path..".svg", f_w, f_h)
|
||||
img:finish()
|
||||
wibox.widget.draw_to_svg_file(container, image_path..".svg", f_w, f_h)
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
|
@ -2,7 +2,6 @@ local file_path, image_path = ...
|
|||
require("_common_template")(...)
|
||||
|
||||
local wibox = require( "wibox" )
|
||||
local surface = require( "gears.surface" )
|
||||
local color = require( "gears.color" )
|
||||
local beautiful = require( "beautiful" )
|
||||
local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility with Lua 5.1)
|
||||
|
@ -99,7 +98,6 @@ for _ = 1, 10 do
|
|||
end
|
||||
|
||||
-- Save to the output file
|
||||
local img = surface["widget_to_svg"](widget, image_path..".svg", w or 200, h or 30)
|
||||
img:finish()
|
||||
wibox.widget.draw_to_svg_file(widget, image_path..".svg", w or 200, h or 30)
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
Loading…
Reference in New Issue