From ceb6eb311daf01bfb856abd22e07d9250a463889 Mon Sep 17 00:00:00 2001 From: Anurag Priyam Date: Sun, 6 May 2012 07:25:10 +0530 Subject: [PATCH] wibox: assume a default background and foreground color if none passed Signed-off-by: Anurag Priyam Signed-off-by: Uli Schlachter --- lib/wibox/init.lua.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/wibox/init.lua.in b/lib/wibox/init.lua.in index 16b1c294..02b84940 100644 --- a/lib/wibox/init.lua.in +++ b/lib/wibox/init.lua.in @@ -127,8 +127,7 @@ end -- @param c The background to use. This must either be a cairo pattern object, -- nil or a string that gears.color() understands. function set_bg(wibox, c) - local c = c - local colstr = "#000000" -- Default if we can't figure out the color + local c = c or "#000000" if type(c) == "string" or type(c) == "table" then c = color(c) end @@ -148,7 +147,7 @@ end -- @param c The foreground to use. This must either be a cairo pattern object, -- nil or a string that gears.color() understands. function set_fg(wibox, c) - local c = c + local c = c or "#FFFFFF" if type(c) == "string" or type(c) == "table" then c = color(c) end