diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-03-18 13:18:50 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-03-18 13:23:16 -0700 |
commit | 471b944704559f0ec3436c3e71da5752e9742e86 (patch) | |
tree | 15021742a88d168377a3244dac01cbf4dfb519eb /profile.c | |
parent | 1e37fa99ed0c837e4579ac507212e21f5069732a (diff) | |
download | subsurface-471b944704559f0ec3436c3e71da5752e9742e86.tar.gz |
Finetune event triangle position to have the top point at the event time
This should make it easier to then delete events from the context menu.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -383,17 +383,17 @@ static void plot_one_event(struct graphics_context *gc, struct plot_info *pi, st x = SCALEX(gc, event->time.seconds); y = SCALEY(gc, depth); set_source_rgba(gc, ALERT_BG); - cairo_move_to(gc->cr, x-15, y+6); - cairo_line_to(gc->cr, x-3 , y+6); - cairo_line_to(gc->cr, x-9, y-6); - cairo_line_to(gc->cr, x-15, y+6); + cairo_move_to(gc->cr, x-6, y+12); + cairo_line_to(gc->cr, x+6, y+12); + cairo_line_to(gc->cr, x , y); + cairo_line_to(gc->cr, x-6, y+12); cairo_stroke_preserve(gc->cr); cairo_fill(gc->cr); set_source_rgba(gc, ALERT_FG); - cairo_move_to(gc->cr, x-9, y-3); - cairo_line_to(gc->cr, x-9, y+1); - cairo_move_to(gc->cr, x-9, y+4); - cairo_line_to(gc->cr, x-9, y+4); + cairo_move_to(gc->cr, x, y+3); + cairo_line_to(gc->cr, x, y+7); + cairo_move_to(gc->cr, x, y+10); + cairo_line_to(gc->cr, x, y+10); cairo_stroke(gc->cr); /* we display the event on screen - so translate */ if (event->value) { @@ -423,7 +423,7 @@ static void plot_one_event(struct graphics_context *gc, struct plot_info *pi, st event->flags == SAMPLE_FLAGS_BEGIN ? C_("Starts with space!"," begin") : event->flags == SAMPLE_FLAGS_END ? C_("Starts with space!", " end") : ""); } - attach_tooltip(x-15, y-6, 12, 12, buffer); + attach_tooltip(x-6, y, 12, 12, buffer); } static void plot_events(struct graphics_context *gc, struct plot_info *pi, struct divecomputer *dc) |