It's good to have centre bezels
This commit is contained in:
parent
dbe473224b
commit
78379cd027
3 changed files with 8 additions and 2 deletions
|
@ -96,3 +96,9 @@ class Dial(Gauge):
|
|||
cr.set_line_width(self.BEZEL_WIDTH)
|
||||
cr.arc(*arc)
|
||||
cr.stroke()
|
||||
|
||||
# Gauge center bezel
|
||||
cr.set_source_rgb(1, 1, 1)
|
||||
cr.set_line_width(self.BEZEL_WIDTH / 3)
|
||||
cr.arc(self.x, self.y, self.radius / 2, 0, 2.0 * math.pi)
|
||||
cr.stroke()
|
||||
|
|
|
@ -39,4 +39,4 @@ class Speedo(Dial):
|
|||
self.draw_mark(cr, min_radius, 0.87, speed)
|
||||
|
||||
for speed in range(0, int(self.max_value)+1, 20):
|
||||
self.draw_number(cr, 0.65, speed, "%d" % int(speed))
|
||||
self.draw_number(cr, 0.68, speed, "%d" % int(speed))
|
||||
|
|
|
@ -59,7 +59,7 @@ class ThermoGauge(Dial):
|
|||
self.draw_value(cr, 0.78, 0, "C", 0, 5)
|
||||
|
||||
cr.set_source_rgb(1, 0, 0)
|
||||
self.draw_value(cr, 0.75, self.MAX_VALUE - self.MIN_VALUE, "H", -20, 10)
|
||||
self.draw_value(cr, 0.75, self.MAX_VALUE - self.MIN_VALUE, "H", -25, 15)
|
||||
|
||||
cr.set_line_width(6.0)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue