aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-core/profile.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-13 16:47:52 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-13 16:47:52 -0800
commit0dba3c4e4a33b5ba566244d9dcea64c903f4ac7c (patch)
tree965013b69eb4db79e6f71d71ff629df80542f233 /subsurface-core/profile.c
parent53024ca76dda71ad1a3447d8ec9e15fe70c69c9f (diff)
downloadsubsurface-0dba3c4e4a33b5ba566244d9dcea64c903f4ac7c.tar.gz
Don't round up / use minimum duration for profile in Subsurface-mobile
On the desktop we have long had this vision of a minimum length and a "pleasant" duration of the profile - but on a device this seems to look like uneven margins. So let's just add space for the labels and not otherwise mess with the duration. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/profile.c')
-rw-r--r--subsurface-core/profile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/subsurface-core/profile.c b/subsurface-core/profile.c
index 1969a6fac..55faf9ca7 100644
--- a/subsurface-core/profile.c
+++ b/subsurface-core/profile.c
@@ -86,8 +86,13 @@ int get_maxtime(struct plot_info *pi)
else
return ROUND_UP(seconds + DURATION_THR/4, CEILING);
} else {
+#ifndef SUBSURFACE_MOBILE
/* min 30 minutes, rounded up to 5 minutes, with at least 2.5 minutes to spare */
return MAX(30 * 60, ROUND_UP(seconds + DURATION_THR/4, CEILING * 5));
+#else
+ /* just add 2.5 minutes so we have a consistant right margin */
+ return seconds + DURATION_THR / 4;
+#endif
}
}