[gthumb] image-selector: do not paint the darker background when dragging



commit 8b15df4251ee53af73c46259633b28a6be4b62d1
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Apr 6 12:24:31 2011 +0200

    image-selector: do not paint the darker background when dragging
    
    in order to speed-up selection moving
    
    [bug #644344]

 gthumb/gth-image-selector.c |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/gthumb/gth-image-selector.c b/gthumb/gth-image-selector.c
index 95832c9..85c4363 100644
--- a/gthumb/gth-image-selector.c
+++ b/gthumb/gth-image-selector.c
@@ -619,14 +619,15 @@ paint_selection (GthImageSelector *self,
 	selection_area.x += self->priv->viewer->image_area.x - self->priv->viewer->x_offset;
 	selection_area.y += self->priv->viewer->image_area.y - self->priv->viewer->y_offset;
 
-	gth_image_viewer_paint_region (self->priv->viewer,
-				       cr,
-				       self->priv->pixbuf,
-				       self->priv->viewer->x_offset - self->priv->viewer->image_area.x,
-				       self->priv->viewer->y_offset - self->priv->viewer->image_area.y,
-				       &selection_area,
-				       event->region,
-				       GDK_INTERP_TILES);
+	if (! self->priv->viewer->dragging)
+		gth_image_viewer_paint_region (self->priv->viewer,
+					       cr,
+					       self->priv->pixbuf,
+					       self->priv->viewer->x_offset - self->priv->viewer->image_area.x,
+					       self->priv->viewer->y_offset - self->priv->viewer->image_area.y,
+					       &selection_area,
+					       event->region,
+					       GDK_INTERP_TILES);
 
 	cairo_save (cr);
 #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 9, 2)
@@ -723,7 +724,10 @@ gth_image_selector_expose (GthImageViewerTool *base,
 		return;
 
 	if (self->priv->mask_visible) {
-		paint_background (self, event, cr);
+		if (self->priv->viewer->dragging)
+			paint_image (self, event, cr);
+		else
+			paint_background (self, event, cr);
 		paint_selection (self, event, cr);
 	}
 	else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]