diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-11 13:20:32 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-11 14:44:10 +0100 |
commit | 01e8984d7d3b6da1196766b3b411151a5a7a5053 (patch) | |
tree | ecea8ec90dcf28b23ec45fad582ded34fbdedc3c /print.c | |
parent | fe4f13f184ffb97ee4b6dbd4138a9d8ae3aabd14 (diff) | |
download | subsurface-01e8984d7d3b6da1196766b3b411151a5a7a5053.tar.gz |
Create tool-tip with depth/pressure for the whole profile area
This extends on our current tooltip logic (which shows events when you
mouse over them) to show tooltips for the whole profile area.
If you mouse over an event, that is still shown in the tooltip, but
even in the absense of events, the tooltip will be active, and mousing
over the profile area will show the time, depth and pressure.
This can certainly be improved upon further, but even in this form it is
useful.
Fixes #9
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'print.c')
-rw-r--r-- | print.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -300,13 +300,13 @@ static void show_dive_table(struct dive *dive, cairo_t *cr, double w, static void show_dive_profile(struct dive *dive, cairo_t *cr, double w, double h) { - cairo_rectangle_t drawing_area = { w/20.0, h/20.0, w, h}; struct graphics_context gc = { .printer = 1, - .cr = cr + .cr = cr, + .drawing_area = { w/20.0, h/20.0, w, h}, }; cairo_save(cr); - plot(&gc, &drawing_area, dive, SC_PRINT); + plot(&gc, dive, SC_PRINT); cairo_restore(cr); } |