mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
graphwidgets: Don't draw over the border with the tick lines
This commit is contained in:
parent
3f3ff6558a
commit
b87eb57554
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user