]> Pileus Git - ~andy/gtk/commitdiff
Forgotten file, ChangeLog from 2005-01-27
authorMatthias Clasen <matthiasc@src.gnome.org>
Tue, 1 Feb 2005 18:13:06 +0000 (18:13 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 1 Feb 2005 18:13:06 +0000 (18:13 +0000)
gtk/gtkcellrenderertext.c

index 972bb370150dffc74c7f5e72dcab346bc8dfbaa1..cda7fece142cdf82713ae3959f386d9cf552b902 100644 (file)
@@ -1532,7 +1532,8 @@ get_size (GtkCellRenderer *cell,
          char_width = pango_font_metrics_get_approximate_char_width (metrics);
          pango_font_metrics_unref (metrics);
          
-         *width += (PANGO_PIXELS (char_width) * MAX (priv->width_chars, 3));
+         *width = GTK_CELL_RENDERER (celltext)->xpad * 2
+           + (PANGO_PIXELS (char_width) * MAX (priv->width_chars, 3));
        }
       else
        {
@@ -1653,12 +1654,9 @@ gtk_cell_renderer_text_render (GtkCellRenderer      *cell,
   if (priv->ellipsize_set)
     pango_layout_set_width (layout, 
                            (cell_area->width - x_offset - 2 * cell->xpad) * PANGO_SCALE);
-  else if (priv->wrap_width != -1)
-    pango_layout_set_width (layout, 
-                           priv->wrap_width * PANGO_SCALE);      
-  else
+  else if (priv->wrap_width == -1)
     pango_layout_set_width (layout, -1);
-  
+
   gtk_paint_layout (widget->style,
                     window,
                     state,