[eog/wip/baedert/gtkimageview: 67/75] scroll-view: Use the bounding box size for the transparent bg



commit f4c31b84b129fdcb2ad294179f3ce09740f12b7c
Author: Timm Bäder <mail baedert org>
Date:   Sat Mar 19 12:17:55 2016 +0100

    scroll-view: Use the bounding box size for the transparent bg

 src/eog-image.c       |    2 ++
 src/eog-scroll-view.c |    6 ++----
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/eog-image.c b/src/eog-image.c
index 99c86a1..83f662c 100644
--- a/src/eog-image.c
+++ b/src/eog-image.c
@@ -351,6 +351,8 @@ render_svg_surface (EogImage *img)
        w = (int)(priv->width * priv->view_scale);
        h = (int)(priv->height * priv->view_scale);
 
+       g_message ("Rendering svg surface with size %d, %d", w, h);
+
        priv->surface = gdk_window_create_similar_image_surface (NULL,
                                                                 CAIRO_FORMAT_ARGB32,
                                                                 w, h,
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c
index e801b58..c7356e5 100644
--- a/src/eog-scroll-view.c
+++ b/src/eog-scroll-view.c
@@ -899,7 +899,6 @@ display_draw (GtkWidget *widget, cairo_t *cr, gpointer data)
        EogScrollViewPrivate *priv;
        GtkAllocation allocation;
        int scaled_width, scaled_height;
-       double scale;
        int xofs, yofs;
 
        g_return_val_if_fail (EOG_IS_SCROLL_VIEW (data), FALSE);
@@ -912,9 +911,8 @@ display_draw (GtkWidget *widget, cairo_t *cr, gpointer data)
                return TRUE;
 
 
-       scale = gtk_image_view_get_scale (GTK_IMAGE_VIEW (priv->display));
-       scaled_width = (int)(scale * gtk_abstract_image_get_width (GTK_ABSTRACT_IMAGE (priv->image)));
-       scaled_height = (int)(scale * gtk_abstract_image_get_height (GTK_ABSTRACT_IMAGE (priv->image)));
+       scaled_width = (int)gtk_adjustment_get_upper (priv->hadj);
+       scaled_height = (int)gtk_adjustment_get_upper (priv->vadj);
 
        gtk_widget_get_allocation (priv->display, &allocation);
 


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