summaryrefslogtreecommitdiff
path: root/mate-screenshot/src/screenshot-dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'mate-screenshot/src/screenshot-dialog.c')
-rw-r--r--mate-screenshot/src/screenshot-dialog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mate-screenshot/src/screenshot-dialog.c b/mate-screenshot/src/screenshot-dialog.c
index 66c9cd26..118e03ee 100644
--- a/mate-screenshot/src/screenshot-dialog.c
+++ b/mate-screenshot/src/screenshot-dialog.c
@@ -236,10 +236,10 @@ screenshot_dialog_new (GdkPixbuf *screenshot,
g_free (current_folder);
gtk_widget_set_size_request (preview_darea, width, height);
+ height = gdk_pixbuf_get_height (screenshot);
+ width = gdk_pixbuf_get_width (screenshot);
gtk_aspect_frame_set (GTK_ASPECT_FRAME (aspect_frame), 0.0, 0.5,
- gdk_pixbuf_get_width (screenshot)/
- (gfloat) gdk_pixbuf_get_height (screenshot),
- FALSE);
+ (gfloat) width / (gfloat) height, FALSE);
g_signal_connect (toplevel, "key_press_event", G_CALLBACK (on_toplevel_key_press_event), dialog);
g_signal_connect (preview_darea, "draw", G_CALLBACK (on_preview_draw), dialog);
g_signal_connect (preview_darea, "button_press_event", G_CALLBACK (on_preview_button_press_event), dialog);