From c8b93cec76c60978f1e9e89d025e41609224c4da Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 29 Sep 2010 19:26:23 +0200 Subject: [PATCH] progressbar: Remove gradients gears.color can do the same in better and they are currently broken anyway. Signed-off-by: Uli Schlachter --- lib/awful/widget/progressbar.lua.in | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/lib/awful/widget/progressbar.lua.in b/lib/awful/widget/progressbar.lua.in index 4bf8b436f..cb5b06f08 100644 --- a/lib/awful/widget/progressbar.lua.in +++ b/lib/awful/widget/progressbar.lua.in @@ -24,14 +24,6 @@ local data = setmetatable({}, { __mode = "k" }) -- @param progressbar The progressbar. -- @param color The border color to set. ---- Set the progressbar foreground color as a gradient. --- @name set_gradient_colors --- @class function --- @param progressbar The progressbar. --- @param gradient_colors A table with gradients colors. The distance between each color --- 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 -- @class function @@ -75,7 +67,7 @@ local data = setmetatable({}, { __mode = "k" }) -- @param value The value. local properties = { "width", "height", "border_color", - "gradient_colors", "color", "background_color", + "color", "background_color", "vertical", "value", "max_value", "ticks", "ticks_gap", "ticks_size" } @@ -114,17 +106,10 @@ local function update(pbar) angle = 180 end - -- Draw full gradient - if data[pbar].gradient_colors then - img:draw_rectangle_gradient(border_width, border_width, - over_drawn_width, over_drawn_height, - data[pbar].gradient_colors, angle) - else - cr:rectangle(border_width, border_width, - over_drawn_width, over_drawn_height) - cr:set_source(color(data[pbar].color or "#ff0000")) - cr:fill() - end + cr:rectangle(border_width, border_width, + over_drawn_width, over_drawn_height) + cr:set_source(color(data[pbar].color or "#ff0000")) + cr:fill() -- Cover the part that is not set with a rectangle if data[pbar].vertical then