From 49b4573bc874a714315f1990acae455f9a608d94 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 18 Sep 2010 12:27:09 +0200 Subject: [PATCH] awful.widget: Stop using named colors Those were removed a while ago already. Signed-off-by: Uli Schlachter --- lib/awful/widget/graph.lua.in | 8 ++++---- lib/awful/widget/progressbar.lua.in | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/awful/widget/graph.lua.in b/lib/awful/widget/graph.lua.in index 85a6fe2f..df21886e 100644 --- a/lib/awful/widget/graph.lua.in +++ b/lib/awful/widget/graph.lua.in @@ -30,8 +30,8 @@ local data = setmetatable({}, { __mode = "k" }) -- @class function -- @param graph The graph. -- @param gradient_colors A table with gradients colors. The distance between each color --- can also be specified. Example: { "red", "blue" } or { "red", "green", --- "blue", blue = 10 } to specify blue distance from other colors. +-- can also be specified. Example: { "#ff0000", "#0000ff" } or { "#ff0000", "#00ff00", +-- "#0000ff", ["#0000ff"] = 10 } to specify blue distance from other colors. --- Set the graph foreground colors gradient angle. Default is 270 degrees -- (horizontal). @@ -126,7 +126,7 @@ local function update(graph) math.ceil((data[graph].height - 2 * border_width) * (1 - (rel_i / max_value))), rel_x, border_width - 1 + math.ceil((data[graph].height - 2 * border_width) * (1 - (value / max_value))), - color or "red") + color or "#ff0000") rel_i = value end end @@ -153,7 +153,7 @@ local function update(graph) img:draw_rectangle(border_width, border_width, data[graph].width - (2 * border_width), data[graph].height - (2 * border_width), - true, data[graph].color or "red") + true, data[graph].color or "#ff0000") end -- Draw the background on no value diff --git a/lib/awful/widget/progressbar.lua.in b/lib/awful/widget/progressbar.lua.in index c4e6a940..1b45bca7 100644 --- a/lib/awful/widget/progressbar.lua.in +++ b/lib/awful/widget/progressbar.lua.in @@ -28,8 +28,8 @@ local data = setmetatable({}, { __mode = "k" }) -- @class function -- @param progressbar The progressbar. -- @param gradient_colors A table with gradients colors. The distance between each color --- can also be specified. Example: { "red", "blue" } or { "red", "green", --- "blue", blue = 10 } to specify blue distance from other colors. +-- can also be specified. Example: { "#ff0000", "#0000ff" } or { "#ff0000", "#00ff00", +-- "#0000ff", ["#0000ff"] = 10 } to specify blue distance from other colors. --- Set the progressbar foreground color. -- @name set_color @@ -117,7 +117,7 @@ local function update(pbar) else img:draw_rectangle(border_width, border_width, over_drawn_width, over_drawn_height, - true, data[pbar].color or "red") + true, data[pbar].color or "#ff0000") end -- Cover the part that is not set with a rectangle