Always center the image after a wrap. I can't think of a case when that
2008-08-10 Martin Nordholts <martinn@svn.gnome.org> * app/display/gimpdisplayshell.c (gimp_display_shell_shrink_wrap): Always center the image after a wrap. I can't think of a case when that shouldn't happen. * app/display/gimpdisplayshell-handlers.c (gimp_display_shell_size_changed_detailed_handler): Centering occurs implicitly after wrapping now, no need to do it explicitly. * app/display/gimpdisplayshell-scroll.c (gimp_display_shell_scroll_center_image): Handle the no-image case. svn path=/trunk/; revision=26487
This commit is contained in:

committed by
Martin Nordholts

parent
b41206c334
commit
21a6d735e5
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
|
||||
|
||||
* app/display/gimpdisplayshell.c (gimp_display_shell_shrink_wrap):
|
||||
Always center the image after a wrap. I can't think of a case when
|
||||
that shouldn't happen.
|
||||
|
||||
* app/display/gimpdisplayshell-handlers.c
|
||||
(gimp_display_shell_size_changed_detailed_handler): Centering
|
||||
occurs implicitly after wrapping now, no need to do it explicitly.
|
||||
|
||||
* app/display/gimpdisplayshell-scroll.c
|
||||
(gimp_display_shell_scroll_center_image): Handle the no-image
|
||||
case.
|
||||
|
||||
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
|
||||
|
||||
* app/display/gimpdisplayshell-scroll.[ch]
|
||||
|
@ -492,7 +492,6 @@ gimp_display_shell_size_changed_detailed_handler (GimpImage *image,
|
||||
* has change size
|
||||
*/
|
||||
gimp_display_shell_shrink_wrap (shell, FALSE);
|
||||
gimp_display_shell_scroll_center_image_on_next_size_allocate (shell);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -252,7 +252,8 @@ gimp_display_shell_scroll_center_image (GimpDisplayShell *shell,
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
|
||||
if (! shell->display)
|
||||
if (! shell->display ||
|
||||
! shell->display->image)
|
||||
return;
|
||||
|
||||
target_offset_x = shell->offset_x;
|
||||
|
@ -1884,6 +1884,9 @@ gimp_display_shell_shrink_wrap (GimpDisplayShell *shell,
|
||||
}
|
||||
|
||||
gtk_window_resize (GTK_WINDOW (shell), width, height);
|
||||
|
||||
/* A wrap always means that we should center the image too */
|
||||
gimp_display_shell_scroll_center_image_on_next_size_allocate (shell);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user