[sushi] font-widget: let min_height fall back to the actual height



commit b875e42a24b6e4a2b8e155958ba099e2ee6fd78b
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue May 1 11:58:18 2012 -0400

    font-widget: let min_height fall back to the actual height
    
    If we are unable to find a better measure for it.

 src/libsushi/sushi-font-widget.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/libsushi/sushi-font-widget.c b/src/libsushi/sushi-font-widget.c
index 6546385..7b7ce39 100644
--- a/src/libsushi/sushi-font-widget.c
+++ b/src/libsushi/sushi-font-widget.c
@@ -297,6 +297,9 @@ sushi_font_widget_size_request (GtkWidget *drawing_area,
     return;
   }
 
+  if (min_height != NULL)
+    *min_height = -1;
+
   surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
                                         SURFACE_SIZE, SURFACE_SIZE);
   cr = cairo_create (surface);
@@ -364,6 +367,9 @@ sushi_font_widget_size_request (GtkWidget *drawing_area,
 
   pixmap_height += padding.bottom + SECTION_SPACING;
 
+  if (min_height != NULL && *min_height == -1)
+    *min_height = pixmap_height;
+
   if (width != NULL)
     *width = pixmap_width;
 



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