summaryrefslogtreecommitdiff
path: root/src/MediaPage.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-06-28 21:35:52 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-28 21:35:52 +0200
commitb86540b743f1a87a163ffb811c8fe22a01fefa38 (patch)
treeb47cb3bb83c2377234226fb3987ab3320a987dd9 /src/MediaPage.vala
parentac6e0b731b9f0b2efd392e3309a5c07e2a66adad (diff)
parente905d8e16eec152d19797937f13ba3cf4b8f8aca (diff)
Merge branch 'release/debian/0.32.1-1'debian/0.32.1-1
Diffstat (limited to 'src/MediaPage.vala')
-rw-r--r--src/MediaPage.vala7
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;