From 5c9ffb8ef30e364730475c1484e3c5b20a512651 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Tue, 28 Dec 2021 14:08:37 -0800 Subject: [PATCH] imagebox: Expose the private SVG handling function. To be used by `wibox.container.border`, which is a specialized imagebox. --- lib/wibox/widget/imagebox.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/wibox/widget/imagebox.lua b/lib/wibox/widget/imagebox.lua index efd7b010a..631c32a56 100644 --- a/lib/wibox/widget/imagebox.lua +++ b/lib/wibox/widget/imagebox.lua @@ -56,11 +56,11 @@ local imagebox = { mt = {} } local rsvg_handle_cache = setmetatable({}, { __mode = 'k' }) ----Load rsvg handle form image file +--Load rsvg handle form image file -- @tparam string file Path to svg file. -- @return Rsvg handle -- @treturn table A table where cached data can be stored. -local function load_rsvg_handle(file) +function imagebox._load_rsvg_handle(file) if not Rsvg then return end local cache = (rsvg_handle_cache[file] or {})["handle"] @@ -343,7 +343,7 @@ function imagebox:set_image(image) if type(image) == "string" then -- try to load rsvg handle from file - setup_succeed = load_and_apply(self, image, load_rsvg_handle, set_handle) + setup_succeed = load_and_apply(self, image, imagebox._load_rsvg_handle, set_handle) if not setup_succeed then -- rsvg handle failed, try to load cairo surface with pixbuf