diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-06-14 20:36:17 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-06-14 20:36:17 +0200 |
commit | 31804433d72460cbe0a39f9f8ea5e76058d84cda (patch) | |
tree | 2084a84c39f159c6aea254775dc0880d52579d45 /src/MediaPage.vala | |
parent | a9898fb3f39c44a85876930ef6b2558052569ae6 (diff) | |
parent | d443a3c2509889533ca812c163056bace396b586 (diff) |
Update upstream source from tag 'upstream/0.32.1'
Update to upstream version '0.32.1'
with Debian dir c460ad6e13d3c39eaa2d5399059385e64e6fba4c
Diffstat (limited to 'src/MediaPage.vala')
-rw-r--r-- | src/MediaPage.vala | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/MediaPage.vala b/src/MediaPage.vala index f849ac3..5fa3fca 100644 --- a/src/MediaPage.vala +++ b/src/MediaPage.vala @@ -90,10 +90,7 @@ public abstract class MediaPage : CheckerboardPage { } public static double scale_to_slider(int value) { - assert(value >= Thumbnail.MIN_SCALE); - assert(value <= Thumbnail.MAX_SCALE); - - return (double) ((value - Thumbnail.MIN_SCALE) / SLIDER_STEPPING); + return (double) ((value.clamp(Thumbnail.MIN_SCALE, Thumbnail.MAX_SCALE) - Thumbnail.MIN_SCALE) / SLIDER_STEPPING); } public static int slider_to_scale(double value) { @@ -887,7 +884,7 @@ public abstract class MediaPage : CheckerboardPage { case SortBy.EXPOSURE_DATE: if (ascending) comparator = Thumbnail.exposure_time_ascending_comparator; - else comparator = Thumbnail.exposure_time_desending_comparator; + else comparator = Thumbnail.exposure_time_descending_comparator; predicate = Thumbnail.exposure_time_comparator_predicate; break; |