diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-08-03 23:47:28 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-08-03 23:47:28 +0800 |
commit | 11e7d40e8fa159a122e4c98b09cfb0cd4902f342 (patch) | |
tree | 3d7b0093cc2b32288d7e9cb0aa462ec60748736f | |
parent | 6d802e0857acd15eeee35680d780957623375882 (diff) | |
download | gsoc2013-epiphany-11e7d40e8fa159a122e4c98b09cfb0cd4902f342.tar gsoc2013-epiphany-11e7d40e8fa159a122e4c98b09cfb0cd4902f342.tar.gz gsoc2013-epiphany-11e7d40e8fa159a122e4c98b09cfb0cd4902f342.tar.bz2 gsoc2013-epiphany-11e7d40e8fa159a122e4c98b09cfb0cd4902f342.tar.lz gsoc2013-epiphany-11e7d40e8fa159a122e4c98b09cfb0cd4902f342.tar.xz gsoc2013-epiphany-11e7d40e8fa159a122e4c98b09cfb0cd4902f342.tar.zst gsoc2013-epiphany-11e7d40e8fa159a122e4c98b09cfb0cd4902f342.zip |
Use the entry's style's [xy]thickness, not our own. Fixes rendering with
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.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | lib/widgets/ephy-icon-entry.c | 58 |
2 files changed, 41 insertions, 25 deletions
@@ -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)) |