Skip to content

Commit

Permalink
marker: more alpha for center box in extended marker uncertainty
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Kriegerowski committed May 8, 2018
1 parent ea2e3ee commit 1b6ea20
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/gui/marker.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,8 @@ def draw_trace(self, viewer, p, tr, time_projection, track_projection,

color = self.select_color(self.color_b)

def draw_box(tmin, tmax):
fill_brush = qg.QBrush(qg.QColor(*color + (50, )))
def draw_box(tmin, tmax, alpha=50):
fill_brush = qg.QBrush(qg.QColor(*color + (alpha, )))
p.setBrush(fill_brush)
dvmin, dvmax = track_projection.get_out_range()
dtmin = time_projection.clipped(tmin)
Expand All @@ -729,7 +729,9 @@ def draw_box(tmin, tmax):
p.fillRect(rect, fill_brush)

if self._uncertainty:
draw_box(self.tmin-self._uncertainty, self.tmax+self._uncertainty)
draw_box(self.tmin, self.tmin - self._uncertainty)
draw_box(self.tmax, self.tmax + self._uncertainty)
draw_box(self.tmin, self.tmax, alpha=35)

Marker.draw_trace(
self, viewer, p, tr, time_projection, track_projection, gain,
Expand Down

0 comments on commit 1b6ea20

Please sign in to comment.