[gnome-photos/wip/rishi/zoom: 1/10] image-view: Fix the range of the "zoom" property
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/zoom: 1/10] image-view: Fix the range of the "zoom" property
- Date: Mon, 5 Jun 2017 18:33:20 +0000 (UTC)
commit 4acd9a57d34b0cedab845ea8dcfe0993e8a00241
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Jun 5 20:24:44 2017 +0200
image-view: Fix the range of the "zoom" property
The zoom factor of an image may approach 0.0, but it will always be a
positive value. So, the lowest acceptable value should be the minimum
positive value that can be held in a gdouble.
Since PhotosImageView doesn't implement any policy about the maximum
and minimum thresholds of the zoom factor, let's use the maximum value
that can be held in a gdouble as the upper limit.
src/photos-image-view.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-image-view.c b/src/photos-image-view.c
index 60138af..b068352 100644
--- a/src/photos-image-view.c
+++ b/src/photos-image-view.c
@@ -447,8 +447,8 @@ photos_image_view_class_init (PhotosImageViewClass *class)
g_param_spec_double ("zoom",
"Zoom",
"Zoom factor",
- 0.0,
- 100.0,
+ G_MINDOUBLE,
+ G_MAXDOUBLE,
1.0,
G_PARAM_READABLE));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]