[libgd] two-lines-renderer: Apply font sizes to the 2nd line
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd] two-lines-renderer: Apply font sizes to the 2nd line
- Date: Thu, 23 Jan 2014 20:03:54 +0000 (UTC)
commit 4797ce46536047a0cbccfc2d54014f6beb5870ef
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jan 23 18:49:33 2014 +0100
two-lines-renderer: Apply font sizes to the 2nd line
So that they are smaller with the latest Adwaita master.
libgd/gd-two-lines-renderer.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libgd/gd-two-lines-renderer.c b/libgd/gd-two-lines-renderer.c
index f35b01d..e41d97d 100644
--- a/libgd/gd-two-lines-renderer.c
+++ b/libgd/gd-two-lines-renderer.c
@@ -274,6 +274,8 @@ gd_two_lines_renderer_render (GtkCellRenderer *cell,
/* render the second layout */
if (layout_two != NULL)
{
+ PangoFontDescription *desc;
+
pango_layout_get_pixel_size (layout_one,
NULL, &line_one_height);
@@ -281,6 +283,10 @@ gd_two_lines_renderer_render (GtkCellRenderer *cell,
gtk_style_context_add_class (context, "dim-label");
gtk_style_context_add_class (context, "subtitle");
+ gtk_style_context_get (context, flags, "font", &desc, NULL);
+ pango_layout_set_font_description (layout_two, desc);
+ pango_font_description_free (desc);
+
state = gtk_cell_renderer_get_state (cell, widget, flags);
gtk_style_context_set_state (context, state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]