changeset 2341:c9948056a6db

Refined zoom step I would give the credentials to the orignal author but he is only known as "unqwist". Closes #359.
author Klaus Ethgen <Klaus@Ethgen.de>
date Thu, 19 May 2016 17:26:05 +0100
parents 9e9ab4e63900
children 3d6d93d16130
files src/image.c src/misc.c src/options.h src/preferences.c
diffstat 4 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/image.c	Thu May 19 16:27:35 2016 +0100
+++ b/src/image.c	Thu May 19 17:26:05 2016 +0100
@@ -1404,8 +1404,8 @@
 		approx = "~";
 		}
 
-	if (rint(l) != l) pl = 1;
-	if (rint(r) != r) pr = 1;
+	if (rint(l) != l) pl = 2;
+	if (rint(r) != r) pr = 2;
 
 	return g_strdup_printf("%.*f :%s%.*f", pl, l, approx, pr, r);
 }
--- a/src/misc.c	Thu May 19 16:27:35 2016 +0100
+++ b/src/misc.c	Thu May 19 17:26:05 2016 +0100
@@ -14,7 +14,7 @@
 
 gdouble get_zoom_increment(void)
 {
-	return ((options->image.zoom_increment != 0) ? (gdouble)options->image.zoom_increment / 10.0 : 1.0);
+	return ((options->image.zoom_increment != 0) ? (gdouble)options->image.zoom_increment / 100.0 : 1.0);
 }
 
 gchar *utf8_validate_or_convert(const gchar *text)
--- a/src/options.h	Thu May 19 16:27:35 2016 +0100
+++ b/src/options.h	Thu May 19 17:26:05 2016 +0100
@@ -67,7 +67,7 @@
 		gboolean zoom_2pass;
 		gboolean zoom_to_fit_allow_expand;
 		guint zoom_quality;
-		gint zoom_increment;	/* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
+		gint zoom_increment;	/* 100 is 1.0, 5 is 0.05, 200 is 2.0, etc. */
 		gboolean use_clutter_renderer;
 
 		gboolean use_custom_border_color_in_fullscreen;
--- a/src/preferences.c	Thu May 19 16:27:35 2016 +0100
+++ b/src/preferences.c	Thu May 19 17:26:05 2016 +0100
@@ -138,7 +138,7 @@
 
 static void zoom_increment_cb(GtkWidget *spin, gpointer data)
 {
-	c_options->image.zoom_increment = (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * 10.0 + 0.01);
+	c_options->image.zoom_increment = (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * 100.0 + 0.01);
 }
 
 static void slideshow_delay_cb(GtkWidget *spin, gpointer data)
@@ -1400,7 +1400,7 @@
 
 	c_options->image.zoom_increment = options->image.zoom_increment;
 	spin = pref_spin_new(group, _("Zoom increment:"), NULL,
-			     0.1, 4.0, 0.1, 1, (gdouble)options->image.zoom_increment / 10.0,
+			     0.01, 4.0, 0.01, 2, (gdouble)options->image.zoom_increment / 100.0,
 			     G_CALLBACK(zoom_increment_cb), NULL);
 	gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS);