diff --git a/ChangeLog b/ChangeLog index 63826ad88b..c305f75ca7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-17 Martin Nordholts + + * app/display/gimpdisplayshell-callbacks.c + (gimp_display_shell_canvas_size_allocate): Don't apply the + centering logic on zoom_on_resize. + 2008-08-17 Martin Nordholts * app/display/gimpdisplayshell.[ch] diff --git a/app/display/gimpdisplayshell-callbacks.c b/app/display/gimpdisplayshell-callbacks.c index 5d7cde6fa2..edc574d203 100644 --- a/app/display/gimpdisplayshell-callbacks.c +++ b/app/display/gimpdisplayshell-callbacks.c @@ -282,6 +282,8 @@ gimp_display_shell_canvas_size_allocate (GtkWidget *widget, gint offset_x; gint offset_y; + /* FIXMEEEEE!!! */ + /* multiply the zoom_factor with the ratio of the new and * old canvas diagonals */ @@ -303,23 +305,27 @@ gimp_display_shell_canvas_size_allocate (GtkWidget *widget, shell->disp_height = allocation->height; /* When we size-allocate due to resize of the top level window, - * we want some additional logic + * we want some additional logic. Don't apply it on + * zoom_on_resize though. */ if (shell->size_allocate_from_configure_event) { - gint sw; - gint sh; - gboolean center_horizontally; - gboolean center_vertically; + if (! shell->zoom_on_resize) + { + gint sw; + gint sh; + gboolean center_horizontally; + gboolean center_vertically; - gimp_display_shell_draw_get_scaled_image_size (shell, &sw, &sh); + gimp_display_shell_draw_get_scaled_image_size (shell, &sw, &sh); - center_horizontally = sw <= shell->disp_width; - center_vertically = sh <= shell->disp_height; + center_horizontally = sw <= shell->disp_width; + center_vertically = sh <= shell->disp_height; - gimp_display_shell_scroll_center_image (shell, - center_horizontally, - center_vertically); + gimp_display_shell_scroll_center_image (shell, + center_horizontally, + center_vertically); + } shell->size_allocate_from_configure_event = FALSE; }