wibox: assume a default background and foreground color if none passed

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Anurag Priyam 2012-05-06 07:25:10 +05:30 committed by Uli Schlachter
parent 95d46f2e32
commit ceb6eb311d
1 changed files with 2 additions and 3 deletions

View File

@ -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