mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
If the indicator in the frequency display is just 1px wide, don't use transparency
This commit is contained in:
parent
71cddb7d78
commit
eb50a5dd41
1 changed files with 2 additions and 1 deletions
|
@ -134,13 +134,14 @@ class LineFrequencyWidget (gtk.DrawingArea):
|
|||
x, y, w, h = self.get_allocation ()
|
||||
|
||||
line_width = position2 - position1
|
||||
ctx.set_source_rgba (1., 0., 0., .5)
|
||||
if line_width <= 1:
|
||||
ctx.set_source_rgb (1., 0., 0.)
|
||||
ctx.set_line_width (1.)
|
||||
ctx.move_to (position1 + .5, 0)
|
||||
ctx.line_to (position1 + .5, h)
|
||||
ctx.stroke ()
|
||||
else:
|
||||
ctx.set_source_rgba (1., 0., 0., .5)
|
||||
ctx.rectangle (position1, 0, line_width, h)
|
||||
ctx.fill ()
|
||||
|
||||
|
|
Loading…
Reference in a new issue