changeset 2665:89f913549674

Update documentation for Fit image to window options
author Colin Clark <colin.clark@cclark.uk>
date Sat, 11 Nov 2017 14:53:53 +0000
parents 5f6be8251b96
children 4aebea1b0d5c
files doc/docbook/GuideOptionsImage.xml src/preferences.c
diffstat 2 files changed, 31 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/doc/docbook/GuideOptionsImage.xml	Fri Nov 10 16:24:59 2017 +0000
+++ b/doc/docbook/GuideOptionsImage.xml	Sat Nov 11 14:53:53 2017 +0000
@@ -73,36 +73,41 @@
       </varlistentry>
       <varlistentry>
         <term>
-          <guilabel>Allow enlargement of image for zoom to fit</guilabel>
+          <guilabel>Zoom increment</guilabel>
+        </term>
+        <listitem>
+          <para>Adjusts the step size when zooming in or out on an image. This value corresponds to the percentage of the original image.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </section>
+  <section id="FitImageToWindow">
+    <title>Fit Image To Window</title>
+    <variablelist>
+      <varlistentry>
+        <term>
+          <guilabel>Allow enlargement of image (max. size in %)</guilabel>
         </term>
         <listitem>
           <para>
             Enable this to allow Geeqie to increase the image size for images that are smaller than the current view area when the zoom is set to
             <emphasis>Fit image to window</emphasis>
-            . The value in the adjoining spin box sets the maximum size permitted in percent i.e. 100% is full-size.
+            . This value sets the maximum expansion permitted in percent i.e. 100% is full-size.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>
-          <guilabel>Limit image size when autofitting</guilabel>
+          <guilabel>Virtual window size (% of actual window)</guilabel>
         </term>
         <listitem>
           <para>
-            This percentage will affect the size of the image when
+            This value will set the virtual size of the window when
             <emphasis>Fit image to window</emphasis>
-            is set. Instead of using 100% of the window, it will use the specified percentage. It allows one to keep a border around the image (values lower than 100%) or to auto zoom the image (values greater than 100%). It affects fullscreen mode too.
+            is set. Instead of using the actual size of the window, the specified percentage of the window will be used. It allows one to keep a border around the image (values lower than 100%) or to auto zoom the image (values greater than 100%). It affects fullscreen mode too.
           </para>
         </listitem>
       </varlistentry>
-      <varlistentry>
-        <term>
-          <guilabel>Zoom increment</guilabel>
-        </term>
-        <listitem>
-          <para>Adjusts the step size when zooming in or out on an image. This value corresponds to the percentage of the original image.</para>
-        </listitem>
-      </varlistentry>
     </variablelist>
   </section>
   <section id="Appearance">
@@ -127,7 +132,7 @@
           <note>
             <para>
               You may use the
-              <emphasis>Limit image size when autofitting</emphasis>
+              <emphasis>Virtual window size</emphasis>
               (see above) option to keep a border around the image in fullscreen mode.
             </para>
           </note>
--- a/src/preferences.c	Fri Nov 10 16:24:59 2017 +0000
+++ b/src/preferences.c	Sat Nov 11 14:53:53 2017 +0000
@@ -1711,27 +1711,31 @@
 	pref_checkbox_new_int(group, _("Two pass rendering (apply HQ zoom and color correction in second pass)"),
 			      options->image.zoom_2pass, &c_options->image.zoom_2pass);
 
+	c_options->image.zoom_increment = options->image.zoom_increment;
+	spin = pref_spin_new(group, _("Zoom increment:"), NULL,
+			     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);
+
+	group = pref_group_new(vbox, FALSE, _("Fit image to window"), GTK_ORIENTATION_VERTICAL);
+
 	hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
-	enlargement_button = pref_checkbox_new_int(hbox, _("Allow enlargement of image for zoom to fit (max. size in %)"),
+	enlargement_button = pref_checkbox_new_int(hbox, _("Allow enlargement of image (max. size in %)"),
 			      options->image.zoom_to_fit_allow_expand, &c_options->image.zoom_to_fit_allow_expand);
 	spin = pref_spin_new_int(hbox, NULL, NULL,
 				 100, 999, 1,
 				 options->image.max_enlargement_size, &c_options->image.max_enlargement_size);
 	pref_checkbox_link_sensitivity(enlargement_button, spin);
+	gtk_widget_set_tooltip_text(GTK_WIDGET(hbox), _("Enable this to allow Geeqie to increase the image size for images that are smaller than the current view area when the zoom is set to \"Fit image to window\". This value sets the maximum expansion permitted in percent i.e. 100% is full-size."));
 
 	hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
-	ct_button = pref_checkbox_new_int(hbox, _("Limit image size when autofitting (% of window):"),
+	ct_button = pref_checkbox_new_int(hbox, _("Virtual window size (% of actual window):"),
 					  options->image.limit_autofit_size, &c_options->image.limit_autofit_size);
 	spin = pref_spin_new_int(hbox, NULL, NULL,
 				 10, 150, 1,
 				 options->image.max_autofit_size, &c_options->image.max_autofit_size);
 	pref_checkbox_link_sensitivity(ct_button, spin);
-
-	c_options->image.zoom_increment = options->image.zoom_increment;
-	spin = pref_spin_new(group, _("Zoom increment:"), NULL,
-			     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);
+	gtk_widget_set_tooltip_text(GTK_WIDGET(hbox), _("This value will set the virtual size of the window when \"Fit image to window\" is set. Instead of using the actual size of the window, the specified percentage of the window will be used. It allows one to keep a border around the image (values lower than 100%) or to auto zoom the image (values greater than 100%). It affects fullscreen mode too."));
 
 	group = pref_group_new(vbox, FALSE, _("Appearance"), GTK_ORIENTATION_VERTICAL);