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:
parent
95d46f2e32
commit
ceb6eb311d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue