[gnome-control-center] shell: Fix bad rendering of search results
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] shell: Fix bad rendering of search results
- Date: Tue, 21 Jun 2011 14:17:04 +0000 (UTC)
commit a37f8770e563d2403a940e93ce42788f11af0ea6
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jun 21 15:10:08 2011 +0100
shell: Fix bad rendering of search results
Don't use pango_cairo_layout_path(), which doesn't do any
hinting whatsoever, use gtk_render_layout() from GTK+ instead,
as the text cell renderer already does.
With help from Matthias Clasen <mclasen redhat com>
https://bugzilla.gnome.org/show_bug.cgi?id=652709
shell/shell-search-renderer.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/shell/shell-search-renderer.c b/shell/shell-search-renderer.c
index 5479fb7..0667bc0 100644
--- a/shell/shell-search-renderer.c
+++ b/shell/shell-search-renderer.c
@@ -277,18 +277,22 @@ shell_search_renderer_render (GtkCellRenderer *cell,
{
ShellSearchRendererPrivate *priv = SHELL_SEARCH_RENDERER (cell)->priv;
PangoRectangle rect;
+ GtkStyleContext *context;
+
+ context = gtk_widget_get_style_context (widget);
shell_search_renderer_set_layout (SHELL_SEARCH_RENDERER (cell), widget);
pango_layout_get_pixel_extents (priv->layout, NULL, &rect);
- cairo_move_to (cr, cell_area->x, cell_area->y);
+ cairo_save (cr);
- /* FIXME: get the correct colour from the theme */
- cairo_set_source_rgb (cr, 0, 0, 0);
- if (priv->layout)
- pango_cairo_layout_path (cr, priv->layout);
- cairo_fill (cr);
+ gtk_render_layout (context, cr,
+ cell_area->x,
+ cell_area->y,
+ priv->layout);
+
+ cairo_restore (cr);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]