[gtk+/wip/baedert/gtkimageview: 270/275] Revert "imageview: Always set adjustment upper to bounding box size"



commit f8f08ab92e556e17d3be1faa7cd1fa9f2806ce7e
Author: Timm Bäder <mail baedert org>
Date:   Thu Mar 24 19:38:36 2016 +0100

    Revert "imageview: Always set adjustment upper to bounding box size"
    
    This doesn't work out.

 gtk/gtkimageview.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkimageview.c b/gtk/gtkimageview.c
index f26db78..7bffb87 100644
--- a/gtk/gtkimageview.c
+++ b/gtk/gtkimageview.c
@@ -700,14 +700,14 @@ gtk_image_view_update_adjustments (GtkImageView *image_view)
    * the widget allocation if fit-allocation is set */
   if (priv->hadjustment)
     {
-      gtk_adjustment_set_upper (priv->hadjustment, width);
+      gtk_adjustment_set_upper (priv->hadjustment, MAX (width,  widget_width));
       gtk_adjustment_set_page_size (priv->hadjustment, widget_width);
       gtk_image_view_restrict_adjustment (priv->hadjustment);
     }
 
   if (priv->vadjustment)
     {
-      gtk_adjustment_set_upper (priv->vadjustment, height);
+      gtk_adjustment_set_upper (priv->vadjustment, MAX (height, widget_height));
       gtk_adjustment_set_page_size (priv->vadjustment, widget_height);
       gtk_image_view_restrict_adjustment (priv->vadjustment);
     }


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