Skip to content

Commit

Permalink
wibox: Allow tables as color specification
Browse files Browse the repository at this point in the history
Signed-off-by: Uli Schlachter <[email protected]>
  • Loading branch information
psychon committed Feb 17, 2012
1 parent 2216b6a commit efee293
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/wibox/init.lua.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit efee293

Please sign in to comment.