There is no need for special casing depending on image size relative to

2008-08-10  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll_center_image): There is no need for
	special casing depending on image size relative to viewport size.

svn path=/trunk/; revision=26471
This commit is contained in:
Martin Nordholts 2008-08-10 07:26:35 +00:00 committed by Martin Nordholts
parent a736df49e2
commit 34b4b890cf
2 changed files with 8 additions and 16 deletions

View file

@ -1,3 +1,9 @@
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.c
(gimp_display_shell_scroll_center_image): There is no need for
special casing depending on image size relative to viewport size.
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
Put functions to center the image in the display shell where they

View file

@ -233,26 +233,12 @@ gimp_display_shell_scroll_center_image (GimpDisplayShell *shell,
if (horizontally)
{
if (sw < shell->disp_width)
{
target_offset_x = -(shell->disp_width - sw) / 2;
}
else
{
target_offset_x = (sw - shell->disp_width) / 2;
}
target_offset_x = (sw - shell->disp_width) / 2;
}
if (vertically)
{
if (sh < shell->disp_height)
{
target_offset_y = -(shell->disp_height - sh) / 2;
}
else
{
target_offset_y = (sh - shell->disp_height) / 2;
}
target_offset_y = (sh - shell->disp_height) / 2;
}
/* Note that we can't use gimp_display_shell_scroll_private() here