<para>\r
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\r
<emphasis>Fit image to window</emphasis>\r
- .\r
+ . The value in the adjoining spin box sets the maximum size permitted in percent i.e. 100% is full-size.\r
</para>\r
</listitem>\r
</varlistentry>\r
"window_limit_value", options->image.max_window_size,
"autofit_limit", options->image.limit_autofit_size,
"autofit_limit_value", options->image.max_autofit_size,
+ "enlargement_limit_value", options->image.max_enlargement_size,
NULL);
options->image.limit_autofit_size = FALSE;
options->image.limit_window_size = TRUE;
options->image.max_autofit_size = 100;
+ options->image.max_enlargement_size = 900;
options->image.max_window_size = 90;
options->image.scroll_reset_method = SCROLL_RESET_NOCHANGE;
options->image.tile_cache_max = 10;
gint max_window_size;
gboolean limit_autofit_size;
gint max_autofit_size;
+ gint max_enlargement_size;
gint tile_cache_max; /* in megabytes */
gint image_cache_max; /* in megabytes */
PROP_WINDOW_LIMIT,
PROP_WINDOW_LIMIT_VALUE,
PROP_AUTOFIT_LIMIT,
- PROP_AUTOFIT_LIMIT_VALUE
+ PROP_AUTOFIT_LIMIT_VALUE,
+ PROP_ENLARGEMENT_LIMIT_VALUE
};
typedef enum {
100,
G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_class_install_property(gobject_class,
+ PROP_ENLARGEMENT_LIMIT_VALUE,
+ g_param_spec_uint("enlargement_limit_value",
+ "Size increase limit of image when autofitting",
+ NULL,
+ 100,
+ 999,
+ 500,
+ G_PARAM_READABLE | G_PARAM_WRITABLE));
+
signals[SIGNAL_ZOOM] =
g_signal_new("zoom",
case PROP_AUTOFIT_LIMIT_VALUE:
pr->autofit_limit_size = g_value_get_uint(value);
break;
+ case PROP_ENLARGEMENT_LIMIT_VALUE:
+ pr->enlargement_limit_size = g_value_get_uint(value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
case PROP_AUTOFIT_LIMIT_VALUE:
g_value_set_uint(value, pr->autofit_limit_size);
break;
+ case PROP_ENLARGEMENT_LIMIT_VALUE:
+ g_value_set_uint(value, pr->enlargement_limit_size);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
scale = scale * factor;
}
+ if (pr->zoom_expand)
+ {
+ gdouble factor = (gdouble)pr->enlargement_limit_size / 100;
+ if (scale > factor)
+ {
+ w = w * factor / scale;
+ h = h * factor / scale;
+ scale = factor;
+ }
+ }
+
if (w < 1) w = 1;
if (h < 1) h = 1;
}
gboolean autofit_limit;
gint autofit_limit_size;
+ gint enlargement_limit_size;
GdkColor color;
options->image.max_window_size = c_options->image.max_window_size;
options->image.limit_autofit_size = c_options->image.limit_autofit_size;
options->image.max_autofit_size = c_options->image.max_autofit_size;
+ options->image.max_enlargement_size = c_options->image.max_enlargement_size;
options->image.use_clutter_renderer = c_options->image.use_clutter_renderer;
options->progressive_key_scrolling = c_options->progressive_key_scrolling;
options->keyboard_scroll_step = c_options->keyboard_scroll_step;
GtkWidget *group;
GtkWidget *button;
GtkWidget *ct_button;
+ GtkWidget *enlargement_button;
GtkWidget *table;
GtkWidget *spin;
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);
- pref_checkbox_new_int(group, _("Allow enlargement of image for zoom to fit"),
+ 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 %)"),
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);
hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
- ct_button = pref_checkbox_new_int(hbox, _("Limit image size when autofitting (%):"),
+ ct_button = pref_checkbox_new_int(hbox, _("Limit image size when autofitting (% of window):"),
options->image.limit_autofit_size, &c_options->image.limit_autofit_size);
spin = pref_spin_new_int(hbox, NULL, NULL,
10, 150, 1,
WRITE_NL(); WRITE_INT(*options, image.max_window_size);
WRITE_NL(); WRITE_BOOL(*options, image.limit_autofit_size);
WRITE_NL(); WRITE_INT(*options, image.max_autofit_size);
+ WRITE_NL(); WRITE_INT(*options, image.max_enlargement_size);
WRITE_NL(); WRITE_UINT(*options, image.scroll_reset_method);
WRITE_NL(); WRITE_INT(*options, image.tile_cache_max);
WRITE_NL(); WRITE_INT(*options, image.image_cache_max);
if (READ_INT(*options, image.max_window_size)) continue;
if (READ_BOOL(*options, image.limit_autofit_size)) continue;
if (READ_INT(*options, image.max_autofit_size)) continue;
+ if (READ_INT(*options, image.max_enlargement_size)) continue;
if (READ_UINT_CLAMP(*options, image.scroll_reset_method, 0, PR_SCROLL_RESET_COUNT - 1)) continue;
if (READ_INT(*options, image.tile_cache_max)) continue;
if (READ_INT(*options, image.image_cache_max)) continue;