[gtk+/wip/entry-css-cleanups: 7/11] cellrenderertext: don't use gtk_entry_set_inner_border()



commit 749f6269a8eed92ca2ccc0b9ba19663ec4690f71
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Jan 30 15:25:04 2012 -0500

    cellrenderertext: don't use gtk_entry_set_inner_border()
    
    There's no need to, since now the theme can just tweak the padding like:
    
    .cell.entry {
      padding: 12;
    }

 gtk/gtkcellrenderertext.c |   28 ----------------------------
 1 files changed, 0 insertions(+), 28 deletions(-)
---
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c
index 580e338..ecc9bb5 100644
--- a/gtk/gtkcellrenderertext.c
+++ b/gtk/gtkcellrenderertext.c
@@ -1981,7 +1981,6 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer      *cell,
 				      const GdkRectangle   *cell_area,
 				      GtkCellRendererState  flags)
 {
-  GtkRequisition requisition;
   GtkCellRendererText *celltext;
   GtkCellRendererTextPrivate *priv;
   gfloat xalign, yalign;
@@ -2005,33 +2004,6 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer      *cell,
   
   gtk_editable_select_region (GTK_EDITABLE (priv->entry), 0, -1);
 
-  gtk_widget_get_preferred_size (priv->entry, &requisition, NULL);
-  if (requisition.height < cell_area->height)
-    {
-      GtkBorder *style_border;
-      GtkBorder border;
-
-      gtk_widget_style_get (priv->entry,
-			    "inner-border", &style_border,
-			    NULL);
-
-      if (style_border)
-        {
-	  border = *style_border;
-	  g_boxed_free (GTK_TYPE_BORDER, style_border);
-	}
-      else
-        {
-	  /* Since boxed style properties can't have default values ... */
-	  border.left = 2;
-	  border.right = 2;
-	}
-
-      border.top = (cell_area->height - requisition.height) / 2;
-      border.bottom = (cell_area->height - requisition.height) / 2;
-      gtk_entry_set_inner_border (GTK_ENTRY (priv->entry), &border);
-    }
-
   priv->in_entry_menu = FALSE;
   if (priv->entry_menu_popdown_timeout)
     {



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