mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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:
parent
53024ca76d
commit
0dba3c4e4a
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue