gimp r26488 - in trunk: . app/display
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26488 - in trunk: . app/display
- Date: Sun, 10 Aug 2008 14:34:10 +0000 (UTC)
Author: martinn
Date: Sun Aug 10 14:34:10 2008
New Revision: 26488
URL: http://svn.gnome.org/viewvc/gimp?rev=26488&view=rev
Log:
2008-08-10 Martin Nordholts <martinn svn gnome org>
* app/display/gimpdisplayshell.c (gimp_display_shell_fill): Recent
refactorings seems to have made the centering hack obsolete so use
gimp_display_shell_scroll_center_image_on_next_size_allocate()
instead.
Modified:
trunk/ChangeLog
trunk/app/display/gimpdisplayshell.c
Modified: trunk/app/display/gimpdisplayshell.c
==============================================================================
--- trunk/app/display/gimpdisplayshell.c (original)
+++ trunk/app/display/gimpdisplayshell.c Sun Aug 10 14:34:10 2008
@@ -1326,35 +1326,6 @@
gimp_ui_manager_update (shell->popup_manager, shell->display);
}
-static void
-gimp_display_shell_center_image_callback (GimpDisplayShell *shell,
- GtkAllocation *allocation,
- GtkWidget *canvas)
-{
- gint sw, sh;
- gboolean center_horizontally;
- gboolean center_vertically;
-
- gimp_display_shell_draw_get_scaled_image_size (shell, &sw, &sh);
-
- /* We only want to center on the axes on which the image is smaller
- * than the display canvas. If it is larger, it will be centered on
- * that axis later, and if we center on all axis unconditionally, we
- * end up with the wrong centering if the image is larger than the
- * display canvas.
- */
- center_horizontally = sw < shell->disp_width;
- center_vertically = sh < shell->disp_height;
-
- gimp_display_shell_scroll_center_image (shell,
- center_horizontally,
- center_vertically);
-
- g_signal_handlers_disconnect_by_func (canvas,
- gimp_display_shell_center_image_callback,
- shell);
-}
-
static gboolean
gimp_display_shell_fill_idle (GimpDisplayShell *shell)
{
@@ -1390,14 +1361,7 @@
gimp_help_set_help_data (shell->canvas, NULL, NULL);
- /* Not pretty, but we need to center the image as soon as the canvas
- * has got its new size allocated. The centering will be wrong if we
- * do it too early, and if we do it too late flickering will occur
- * due to the image being rendered twice.
- */
- g_signal_connect_swapped (shell->canvas, "size-allocate",
- G_CALLBACK (gimp_display_shell_center_image_callback),
- shell);
+ gimp_display_shell_scroll_center_image_on_next_size_allocate (shell);
shell->fill_idle_id = g_idle_add_full (G_PRIORITY_LOW,
(GSourceFunc) gimp_display_shell_fill_idle,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]