Fix missing the last vertical ref line in the timeline display

This commit is contained in:
René Stadler 2007-11-22 10:19:36 +02:00 committed by Stefan Sauer
parent 4514c84713
commit 41eaf0eb5e

View file

@ -306,12 +306,15 @@ class TimelineWidget (gtk.DrawingArea):
ctx = drawable.cairo_create () ctx = drawable.cairo_create ()
x, y, w, h = self.get_allocation () x, y, w, h = self.get_allocation ()
# White background rectangle.
ctx.set_line_width (0.) ctx.set_line_width (0.)
ctx.rectangle (0, 0, w, h) ctx.rectangle (0, 0, w, h)
ctx.set_source_rgb (1., 1., 1.) ctx.set_source_rgb (1., 1., 1.)
ctx.fill () ctx.fill ()
ctx.new_path () ctx.new_path ()
# Horizontal reference lines.
ctx.set_line_width (1.) ctx.set_line_width (1.)
ctx.set_source_rgb (.95, .95, .95) ctx.set_source_rgb (.95, .95, .95)
for i in range (h // 16): for i in range (h // 16):
@ -320,9 +323,10 @@ class TimelineWidget (gtk.DrawingArea):
ctx.line_to (w, y) ctx.line_to (w, y)
ctx.stroke () ctx.stroke ()
# Vertical reference lines.
pixel_step = self.find_indicative_time_step () pixel_step = self.find_indicative_time_step ()
ctx.set_source_rgb (.9, .9, .9) ctx.set_source_rgb (.9, .9, .9)
for i in range (w // pixel_step): for i in range (1, w // pixel_step + 1):
x = i * pixel_step - .5 x = i * pixel_step - .5
ctx.move_to (x, 0) ctx.move_to (x, 0)
ctx.line_to (x, h) ctx.line_to (x, h)