From ff2a5e2ebf1ad4a458214502c24901d6e550bf62 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Fri, 11 Jun 2004 14:05:01 +0000 Subject: hardcode the border size. it is hardcoded in e-text as well. Even using 2004-06-11 Radek Doulik * gal/e-text/e-entry.c (canvas_size_request): hardcode the border size. it is hardcoded in e-text as well. Even using style values in e-text will not help as style values might differ between EText and EEntry. I think it will be best to rewrite EEntry for evo 2.1 so that it derives from GtkEntry and only adds the auto completion feature Fixes part of #42864 svn path=/trunk/; revision=26309 --- widgets/text/e-entry.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'widgets/text/e-entry.c') diff --git a/widgets/text/e-entry.c b/widgets/text/e-entry.c index 085a3a1a52..132de14ee6 100644 --- a/widgets/text/e-entry.c +++ b/widgets/text/e-entry.c @@ -158,6 +158,7 @@ canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, } } +#if 0 static void get_borders (EEntry *entry, gint *xborder, @@ -181,6 +182,7 @@ get_borders (EEntry *entry, *yborder += focus_width; } } +#endif static void canvas_size_request (GtkWidget *widget, GtkRequisition *requisition, @@ -195,7 +197,8 @@ canvas_size_request (GtkWidget *widget, GtkRequisition *requisition, g_return_if_fail (requisition != NULL); if (entry->priv->draw_borders) { - get_borders (entry, &xthick, &ythick); + /* get_borders (entry, &xthick, &ythick); */ + xthick = ythick = 3; } else { xthick = ythick = 0; } @@ -205,9 +208,9 @@ canvas_size_request (GtkWidget *widget, GtkRequisition *requisition, g_object_get (entry->item, "text_width", &width, NULL); - requisition->width = 2 + 2 * xthick + width; + requisition->width = 2*xthick + width; } else { - requisition->width = 2 + MIN_ENTRY_WIDTH + xthick; + requisition->width = MIN_ENTRY_WIDTH + 2*xthick; } if (entry->priv->last_width != requisition->width) gtk_widget_queue_resize (widget); @@ -219,8 +222,7 @@ canvas_size_request (GtkWidget *widget, GtkRequisition *requisition, metrics = pango_context_get_metrics (context, gtk_widget_get_style (widget)->font_desc, pango_context_get_language (context)); - requisition->height = (2 + - PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) + + requisition->height = (PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) + pango_font_metrics_get_descent (metrics)) + 2 * ythick); -- cgit v1.2.3