graphwidgets: Don't draw over the border with the tick lines

This commit is contained in:
Cole Robinson 2010-02-10 12:46:12 -05:00
parent 3f3ff6558a
commit b87eb57554

View File

@ -331,13 +331,6 @@ class Sparkline(gtk.DrawingArea):
cell_area.width - 1,
cell_area.height - 1)
# Foreground-color graphics context
# This draws the black border
fg_gc = widget.style.fg_gc[widget.state]
window.draw_rectangle(fg_gc, False, 0, 0,
cell_area.width - 1,
cell_area.height - 1)
# This draws the marker ticks
max_ticks = 4
dark_gc = widget.style.dark_gc[widget.state]
@ -347,6 +340,13 @@ class Sparkline(gtk.DrawingArea):
cell_area.width - 2,
(cell_area.height / max_ticks) * index)
# Foreground-color graphics context
# This draws the black border
fg_gc = widget.style.fg_gc[widget.state]
window.draw_rectangle(fg_gc, False, 0, 0,
cell_area.width - 1,
cell_area.height - 1)
# Draw the actual sparkline
def get_y(dataset, index):
baseline_y = cell_area.height