mirror of https://github.com/GNOME/gimp.git
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:
parent
a736df49e2
commit
34b4b890cf
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue