wibox: Allow tables as color specification

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2012-02-17 17:50:31 +01:00
parent 2216b6a341
commit efee293dd2
1 changed files with 2 additions and 2 deletions

View File

@ -120,7 +120,7 @@ end
function set_bg(wibox, c)
local c = c
local colstr = "#000000" -- Default if we can't figure out the color
if type(c) == "string" then
if type(c) == "string" or type(c) == "table" then
c = color(c)
end
-- If this is a solid color, propagate the background color to the capi drawin
@ -140,7 +140,7 @@ end
-- nil or a string that gears.color() understands.
function set_fg(wibox, c)
local c = c
if type(c) == "string" then
if type(c) == "string" or type(c) == "table" then
c = color(c)
end
wibox.foreground_color = c