[gthumb] fit_window_to_image: make the max height bigger
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] fit_window_to_image: make the max height bigger
- Date: Sat, 7 Aug 2010 14:55:11 +0000 (UTC)
commit 64b526c1874d7e7d76abda6b0f420e2134ff7e22
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Aug 7 16:55:01 2010 +0200
fit_window_to_image: make the max height bigger
extensions/image_viewer/gth-image-viewer-page.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/extensions/image_viewer/gth-image-viewer-page.c b/extensions/image_viewer/gth-image-viewer-page.c
index 27a3edd..52931e9 100644
--- a/extensions/image_viewer/gth-image-viewer-page.c
+++ b/extensions/image_viewer/gth-image-viewer-page.c
@@ -1240,15 +1240,15 @@ gth_image_viewer_page_shrink_wrap (GthImageViewerPage *self,
screen = gtk_widget_get_screen (GTK_WIDGET (self->priv->browser));
max_width = round ((double) gdk_screen_get_width (screen) * 8.5 / 10.0);
- max_height = round ((double) gdk_screen_get_height (screen) * 7.5 / 10.0);
+ max_height = round ((double) gdk_screen_get_height (screen) * 8.5 / 10.0);
if (width + other_width > max_width) {
- width = max_width;
+ width = max_width - other_width;
height = width / ratio;
}
if (height + other_height > max_height) {
- height = max_height;
+ height = max_height - other_height;
width = height * ratio;
}
@@ -1258,5 +1258,5 @@ gth_image_viewer_page_shrink_wrap (GthImageViewerPage *self,
height + other_height);
if (gth_window_get_current_page (GTH_WINDOW (self->priv->browser)) == GTH_BROWSER_PAGE_VIEWER)
gth_window_apply_saved_size (GTH_WINDOW (self->priv->browser), GTH_BROWSER_PAGE_VIEWER);
- gth_image_viewer_set_fit_mode (GTH_IMAGE_VIEWER (self->priv->viewer), GTH_FIT_SIZE);
+ gth_image_viewer_set_fit_mode (GTH_IMAGE_VIEWER (self->priv->viewer), GTH_FIT_SIZE_IF_LARGER);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]