mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Some more EditorAction icons & color API update
This commit is contained in:
parent
4755c703f4
commit
1ab3d33df7
5 changed files with 86 additions and 3 deletions
|
|
@ -68,3 +68,12 @@ function factory () return function ()
|
|||
end
|
||||
end
|
||||
end end
|
||||
|
||||
function icon (params) return function (ctx, width, height, fg)
|
||||
local txt = Cairo.PangoLayout (ctx, "ArdourMono ".. math.ceil(width * .7) .. "px")
|
||||
txt:set_text ("\u{2669}") -- quarter note symbol UTF8
|
||||
local tw, th = txt:get_pixel_size ()
|
||||
ctx:set_source_rgba (ARDOUR.LuaAPI.color_to_rgba (fg))
|
||||
ctx:move_to (.5 * (width - tw), .5 * (height - th))
|
||||
txt:show_in_cairo_context (ctx)
|
||||
end end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue