[gnome-panel/gtk3] libpanel-applet: Use gtk_render_focus() instead of gtk_paint_focus()
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/gtk3] libpanel-applet: Use gtk_render_focus() instead of gtk_paint_focus()
- Date: Fri, 21 Jan 2011 12:17:22 +0000 (UTC)
commit fc689a95aea200039fbb80a036b4d881d550c15f
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Fri Jan 21 13:16:26 2011 +0100
libpanel-applet: Use gtk_render_focus() instead of gtk_paint_focus()
libpanel-applet/panel-applet.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/libpanel-applet/panel-applet.c b/libpanel-applet/panel-applet.c
index 4c7378b..e228b4d 100644
--- a/libpanel-applet/panel-applet.c
+++ b/libpanel-applet/panel-applet.c
@@ -1260,9 +1260,10 @@ static gboolean
panel_applet_draw (GtkWidget *widget,
cairo_t *cr)
{
+ GtkStyleContext *context;
int border_width;
int focus_width = 0;
- int x, y, width, height;
+ gdouble x, y, width, height;
GTK_WIDGET_CLASS (panel_applet_parent_class)->draw (widget, cr);
@@ -1287,11 +1288,14 @@ panel_applet_draw (GtkWidget *widget,
width -= 2 * border_width;
height -= 2 * border_width;
- gtk_paint_focus (gtk_widget_get_style (widget),
- cr,
- gtk_widget_get_state (widget),
- widget, "panel_applet",
- x, y, width, height);
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_save (context);
+
+ cairo_save (cr);
+ gtk_render_focus (context, cr, x, y, width, height);
+ cairo_restore (cr);
+
+ gtk_style_context_restore (context);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]