diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-11-15 23:59:52 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-11-15 23:59:52 -0500 |
commit | dacd6e9ee33833f6cb779422b226f7823e816cf9 (patch) | |
tree | f6e56850883e4f89e1faa2ab35d6de7442f464c7 | |
parent | b17c36f46bb68f18406cb059ac8674382eb8b54e (diff) | |
download | libgnomekbd-gtk-style-context.tar.gz |
Make build with GtkStyleContextgtk-style-context
Quick port from gtk_paint_ to gtk_render_.
-rw-r--r-- | libgnomekbd/gkbd-keyboard-drawing.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/libgnomekbd/gkbd-keyboard-drawing.c b/libgnomekbd/gkbd-keyboard-drawing.c index 14cd15a..30c0267 100644 --- a/libgnomekbd/gkbd-keyboard-drawing.c +++ b/libgnomekbd/gkbd-keyboard-drawing.c @@ -1384,8 +1384,6 @@ static gboolean draw (GtkWidget * widget, cairo_t *cr, GkbdKeyboardDrawing * drawing) { - GtkAllocation allocation; - if (!drawing->xkb) return FALSE; @@ -1396,13 +1394,10 @@ draw (GtkWidget * widget, cairo_paint (cr); if (gtk_widget_has_focus (widget)) { - gtk_widget_get_allocation (widget, &allocation); - gtk_paint_focus (gtk_widget_get_style (widget), - cr, - gtk_widget_get_state (widget), - widget, "keyboard-drawing", - 0, 0, allocation.width, - allocation.height); + gtk_render_focus (gtk_widget_get_style_context (widget), + cr, 0, 0, + gtk_widget_get_allocated_width (widget), + gtk_widget_get_allocated_height (widget)); } return FALSE; |