mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +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 ()
|
x, y, w, h = self.get_allocation ()
|
||||||
|
|
||||||
line_width = position2 - position1
|
line_width = position2 - position1
|
||||||
ctx.set_source_rgba (1., 0., 0., .5)
|
|
||||||
if line_width <= 1:
|
if line_width <= 1:
|
||||||
|
ctx.set_source_rgb (1., 0., 0.)
|
||||||
ctx.set_line_width (1.)
|
ctx.set_line_width (1.)
|
||||||
ctx.move_to (position1 + .5, 0)
|
ctx.move_to (position1 + .5, 0)
|
||||||
ctx.line_to (position1 + .5, h)
|
ctx.line_to (position1 + .5, h)
|
||||||
ctx.stroke ()
|
ctx.stroke ()
|
||||||
else:
|
else:
|
||||||
|
ctx.set_source_rgba (1., 0., 0., .5)
|
||||||
ctx.rectangle (position1, 0, line_width, h)
|
ctx.rectangle (position1, 0, line_width, h)
|
||||||
ctx.fill ()
|
ctx.fill ()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue