gc = Gdk::GC.new(window)
colormap.alloc_color(@entry.outline_color, false, true)
gc.set_foreground(@entry.outline_color)
- window.draw_polygon(gc, true, [[@xpos - @@borders_thickness, @ypos - @@borders_thickness],
- [@xpos + @pixbuf.width + @@borders_thickness, @ypos - @@borders_thickness],
- [@xpos + @pixbuf.width + @@borders_thickness, @ypos + @pixbuf.height + @@borders_thickness],
- [@xpos - @@borders_thickness, @ypos + @pixbuf.height + @@borders_thickness],
- [@xpos - @@borders_thickness, @ypos - 1],
- [@xpos - 1, @ypos - 1],
- [@xpos - 1, @ypos + @pixbuf.height + 1],
- [@xpos + @pixbuf.width + 1, @ypos + @pixbuf.height + 1],
- [@xpos + @pixbuf.width + 1, @ypos - 1],
- [@xpos - @@borders_thickness, @ypos - 1]])
+ if @entry && @entry.type == 'video'
+ xleft = @xpos - $videoborder_pixbuf.width
+ xright = @xpos + @pixbuf.width + $videoborder_pixbuf.width
+ else
+ xleft = @xpos
+ xright = @xpos + @pixbuf.width
+ end
+ window.draw_polygon(gc, true, [[xleft - @@borders_thickness, @ypos - @@borders_thickness],
+ [xright + @@borders_thickness, @ypos - @@borders_thickness],
+ [xright + @@borders_thickness, @ypos + @pixbuf.height + @@borders_thickness],
+ [xleft - @@borders_thickness, @ypos + @pixbuf.height + @@borders_thickness],
+ [xleft - @@borders_thickness, @ypos - 1],
+ [xleft - 1, @ypos - 1],
+ [xleft - 1, @ypos + @pixbuf.height + 1],
+ [xright + 1, @ypos + @pixbuf.height + 1],
+ [xright + 1, @ypos - 1],
+ [xleft - @@borders_thickness, @ypos - 1]])
end
end
end