mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
fe4f13f184
commit
01e8984d7d
4 changed files with 84 additions and 19 deletions
6
print.c
6
print.c
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue