From 226bb2cc31596e9cd19f08fbaeb3ad4ba061227e Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 18 Dec 2016 18:57:58 +0100 Subject: [PATCH] Fix luacheck warnings in themes/xresources/assets.lua These were introduced by commit 12e1bd67473d5. Signed-off-by: Uli Schlachter --- tests/examples/wibox/logo/logo_and_name.lua | 2 +- themes/xresources/assets.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/examples/wibox/logo/logo_and_name.lua b/tests/examples/wibox/logo/logo_and_name.lua index ef160856e..6530e4e66 100644 --- a/tests/examples/wibox/logo/logo_and_name.lua +++ b/tests/examples/wibox/logo/logo_and_name.lua @@ -13,7 +13,7 @@ wibox.widget { 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) + assets.gen_awesome_name(cr, 158, nil, "#535d6c", alt_fg) end, widget = wibox.widget.base.make_widget } diff --git a/themes/xresources/assets.lua b/themes/xresources/assets.lua index 3c7f4e8a6..9f6bbfa0e 100644 --- a/themes/xresources/assets.lua +++ b/themes/xresources/assets.lua @@ -61,7 +61,7 @@ local function make_letter(cr, n, lines, size, bg, fg, alt_fg) end lines = lines or {} - color = alt_fg or fg + local color = alt_fg or fg cr:set_source(gears.color(color)) cr:rectangle( 0, (size+letter_gap)*n, @@ -83,7 +83,7 @@ local function make_letter(cr, n, lines, size, bg, fg, alt_fg) cr:set_operator(cairo.Operator.OVER) end -function theme_assets.gen_awesome_name(cr, width, height, bg, fg, alt_fg, vertical) +function theme_assets.gen_awesome_name(cr, height, bg, fg, alt_fg) local ls = height/10 -- letter_size local letter_line = ls/18 @@ -178,7 +178,7 @@ function theme_assets.wallpaper(bg, fg, alt_fg, s) cr:set_source(gears.color(bg)) cr:paint() - theme_assets.gen_awesome_name(cr, width, height, bg, fg, alt_fg, true) + theme_assets.gen_awesome_name(cr, height, bg, fg, alt_fg) return img end