On 11.10.2013 23:04, Andrey V Golovin wrote: > Thanks for swift reply, Uli > > > The function to draw is: > colors for bg and fg are taken from array > > function sep(fg,bg) > sp = wibox.widget.base.make_widget() > sp.fit = function(mycross, width, height) > local size = math.min(width, height) > return size/2, size > end
Just a random guess: I need to round the result of fit(). Could you try this: return math.ceil(size/2), size Uli > sp.draw = function(sp, wibox, cr,width, height) > r,g,b,a = hexadecimal_to_rgba_percent(fg) > cr:move_to(width,0) > cr:line_to(0, height) > cr:line_to(width,height) > cr:close_path() > cr:set_line_width(0) > cr:set_source_rgba(r,g,b,a) > cr:fill() > if string.match(bg,"#%w+") > then > r,g,b,a = hexadecimal_to_rgba_percent(bg) > cr:move_to(0,0) > cr:line_to(width,0) > cr:line_to(0,height) > cr:close_path() > cr:set_line_width(3) > cr:set_source_rgba(r,g,b,a) > cr:fill() > else > r,g,b,a = hexadecimal_to_rgba_percent(fg) > cr:move_to(0,0) > cr:line_to(width,0) > cr:line_to(0,height) > cr:close_path() > cr:set_line_width(3) > cr:set_source_rgba(r,g,b,a) > cr:fill() > end > > end > return sp > end -- - Buck, when, exactly, did you lose your mind? - Three months ago. I woke up one morning married to a pineapple. An ugly pineapple... But I loved her. -- To unsubscribe, send mail to [email protected].
