[gthumb] crop: set an initial selection of 2/3 the size of the image and centered



commit 167995e93d04baf7c2519eedb7c10a4a77ca2969
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Apr 6 14:31:09 2011 +0200

    crop: set an initial selection of 2/3 the size of the image and centered

 extensions/file_tools/gth-file-tool-crop.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/extensions/file_tools/gth-file-tool-crop.c b/extensions/file_tools/gth-file-tool-crop.c
index 75b54b8..5614b96 100644
--- a/extensions/file_tools/gth-file-tool-crop.c
+++ b/extensions/file_tools/gth-file-tool-crop.c
@@ -530,6 +530,11 @@ gth_file_tool_crop_get_options (GthFileTool *base)
 
 	gth_image_viewer_set_tool (GTH_IMAGE_VIEWER (viewer), (GthImageViewerTool *) self->priv->selector);
 	ratio_combobox_changed_cb (NULL, self);
+
+	if (! gth_image_selector_set_selection_width (self->priv->selector, self->priv->pixbuf_width * 2 / 3) || ! gth_image_selector_get_use_ratio (self->priv->selector))
+		gth_image_selector_set_selection_height (self->priv->selector, self->priv->pixbuf_height * 2 / 3);
+	gth_image_selector_center (self->priv->selector);
+
 	update_sensitivity (self);
 
 	return options;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]