awful.widget: Stop using named colors

Those were removed a while ago already.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-09-18 12:27:09 +02:00
parent 8701295e6c
commit 49b4573bc8
2 changed files with 7 additions and 7 deletions

View File

@ -30,8 +30,8 @@ local data = setmetatable({}, { __mode = "k" })
-- @class function -- @class function
-- @param graph The graph. -- @param graph The graph.
-- @param gradient_colors A table with gradients colors. The distance between each color -- @param gradient_colors A table with gradients colors. The distance between each color
-- can also be specified. Example: { "red", "blue" } or { "red", "green", -- can also be specified. Example: { "#ff0000", "#0000ff" } or { "#ff0000", "#00ff00",
-- "blue", blue = 10 } to specify blue distance from other colors. -- "#0000ff", ["#0000ff"] = 10 } to specify blue distance from other colors.
--- Set the graph foreground colors gradient angle. Default is 270 degrees --- Set the graph foreground colors gradient angle. Default is 270 degrees
-- (horizontal). -- (horizontal).
@ -126,7 +126,7 @@ local function update(graph)
math.ceil((data[graph].height - 2 * border_width) * (1 - (rel_i / max_value))), math.ceil((data[graph].height - 2 * border_width) * (1 - (rel_i / max_value))),
rel_x, border_width - 1 + rel_x, border_width - 1 +
math.ceil((data[graph].height - 2 * border_width) * (1 - (value / max_value))), math.ceil((data[graph].height - 2 * border_width) * (1 - (value / max_value))),
color or "red") color or "#ff0000")
rel_i = value rel_i = value
end end
end end
@ -153,7 +153,7 @@ local function update(graph)
img:draw_rectangle(border_width, border_width, img:draw_rectangle(border_width, border_width,
data[graph].width - (2 * border_width), data[graph].width - (2 * border_width),
data[graph].height - (2 * border_width), data[graph].height - (2 * border_width),
true, data[graph].color or "red") true, data[graph].color or "#ff0000")
end end
-- Draw the background on no value -- Draw the background on no value

View File

@ -28,8 +28,8 @@ local data = setmetatable({}, { __mode = "k" })
-- @class function -- @class function
-- @param progressbar The progressbar. -- @param progressbar The progressbar.
-- @param gradient_colors A table with gradients colors. The distance between each color -- @param gradient_colors A table with gradients colors. The distance between each color
-- can also be specified. Example: { "red", "blue" } or { "red", "green", -- can also be specified. Example: { "#ff0000", "#0000ff" } or { "#ff0000", "#00ff00",
-- "blue", blue = 10 } to specify blue distance from other colors. -- "#0000ff", ["#0000ff"] = 10 } to specify blue distance from other colors.
--- Set the progressbar foreground color. --- Set the progressbar foreground color.
-- @name set_color -- @name set_color
@ -117,7 +117,7 @@ local function update(pbar)
else else
img:draw_rectangle(border_width, border_width, img:draw_rectangle(border_width, border_width,
over_drawn_width, over_drawn_height, over_drawn_width, over_drawn_height,
true, data[pbar].color or "red") true, data[pbar].color or "#ff0000")
end end
-- Cover the part that is not set with a rectangle -- Cover the part that is not set with a rectangle