summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-18 13:18:50 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-18 13:23:16 -0700
commit471b944704559f0ec3436c3e71da5752e9742e86 (patch)
tree15021742a88d168377a3244dac01cbf4dfb519eb /profile.c
parent1e37fa99ed0c837e4579ac507212e21f5069732a (diff)
downloadsubsurface-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.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/profile.c b/profile.c
index 6bbb11fb1..ce2113e68 100644
--- a/profile.c
+++ b/profile.c
@@ -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)