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>
This commit is contained in:
Dirk Hohndel 2016-01-13 16:47:52 -08:00
parent 53024ca76d
commit 0dba3c4e4a

View file

@ -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
}
}