aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--lib/widgets/ephy-icon-entry.c58
2 files changed, 41 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 33c3df9dd..234c18652 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2005-08-03 Christian Persch <chpe@cvs.gnome.org>
+ * lib/widgets/ephy-icon-entry.c: (ephy_icon_entry_get_borders),
+ (ephy_icon_entry_size_allocate):
+
+ Use the entry's style's [xy]thickness, not our own.
+ Fixes rendering with current Clearlooks engine.
+
+2005-08-03 Christian Persch <chpe@cvs.gnome.org>
+
* lib/widgets/Makefile.am:
A lib/widgets/testiconentry.c:
A lib/widgets/ephy-icon-entry.c:
diff --git a/lib/widgets/ephy-icon-entry.c b/lib/widgets/ephy-icon-entry.c
index 5d871e52e..898b8cadb 100644
--- a/lib/widgets/ephy-icon-entry.c
+++ b/lib/widgets/ephy-icon-entry.c
@@ -57,6 +57,38 @@ entry_focus_change_cb (GtkWidget *widget,
}
static void
+ephy_icon_entry_get_borders (GtkWidget *widget,
+ GtkWidget *entry,
+ int *xborder,
+ int *yborder)
+{
+ int focus_width;
+ gboolean interior_focus;
+
+ g_return_if_fail (entry->style != NULL);
+
+ gtk_widget_style_get (entry,
+ "focus-line-width", &focus_width,
+ "interior-focus", &interior_focus,
+ NULL);
+
+ *xborder = entry->style->xthickness;
+ *yborder = entry->style->ythickness;
+
+ /* While GtkEntry does this only when !interior-focus, we need this even
+ * with interior-focus, since otherwise we end up being too small.
+ */
+ *xborder += focus_width;
+ *yborder += focus_width;
+
+ if (!interior_focus)
+ {
+ *xborder += focus_width;
+ *yborder += focus_width;
+ }
+}
+
+static void
ephy_icon_entry_paint (GtkWidget *widget,
GdkEventExpose *event)
{
@@ -168,30 +200,6 @@ ephy_icon_entry_realize (GtkWidget *widget)
}
static void
-ephy_icon_entry_get_borders (GtkWidget *widget,
- GtkWidget *entry,
- int *xborder,
- int *yborder)
-{
- int focus_width;
-
- g_return_if_fail (entry->style != NULL);
-
- gtk_widget_style_get (entry,
- "focus-line-width", &focus_width,
- NULL);
-
- *xborder = widget->style->xthickness;
- *yborder = widget->style->ythickness;
-
- /* While GtkEntry does this only when !interior-focus, we need this even
- * with interior-focus, since otherwise we end up being too small.
- */
- *xborder += focus_width;
- *yborder += focus_width;
-}
-
-static void
ephy_icon_entry_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
@@ -229,7 +237,7 @@ ephy_icon_entry_size_allocate (GtkWidget *widget,
int xborder, yborder;
widget->allocation = *allocation;
-
+
ephy_icon_entry_get_borders (widget, entry->entry, &xborder, &yborder);
if (GTK_WIDGET_REALIZED (widget))