From 0dba3c4e4a33b5ba566244d9dcea64c903f4ac7c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 13 Jan 2016 16:47:52 -0800 Subject: 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 --- subsurface-core/profile.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'subsurface-core') 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 } } -- cgit v1.2.3-70-g09d2