Fix some script icons for non-square buttons

This commit is contained in:
Robin Gareus 2019-11-19 03:33:28 +01:00
parent 7aaf212a9b
commit cf8a808bd7
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
8 changed files with 14 additions and 10 deletions

View file

@ -25,6 +25,7 @@ end end
function icon (params) return function (ctx, width, height, fg)
local wh = math.min (width, height) * .5
ctx:translate (math.floor (width * .5 - wh), math.floor (height * .5 - wh))
ctx:rectangle (wh * .6, wh * .6, wh * .8, wh * .8)
ctx:set_source_rgba (.1, .1, .1, 1)