[gtk+] Inspector: Use text attributes for monospace labels
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Inspector: Use text attributes for monospace labels
- Date: Tue, 7 Oct 2014 04:49:05 +0000 (UTC)
commit 5a0dc74dedc0dcb495492eee12f9588a7b152f8d
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Oct 7 00:42:46 2014 -0400
Inspector: Use text attributes for monospace labels
gtk/inspector/general.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c
index 773ef88..57c6e4c 100644
--- a/gtk/inspector/general.c
+++ b/gtk/inspector/general.c
@@ -106,10 +106,13 @@ init_version (GtkInspectorGeneral *gen)
static void
set_monospace_font (GtkWidget *w)
{
- PangoFontDescription *font_desc;
- font_desc = pango_font_description_from_string ("monospace");
- gtk_widget_override_font (w, font_desc);
- pango_font_description_free (font_desc);
+ PangoAttrList *attrs;
+
+ attrs = pango_attr_list_new ();
+ pango_attr_list_insert (attrs, pango_attr_fallback_new (FALSE));
+ pango_attr_list_insert (attrs, pango_attr_family_new ("Monospace"));
+ gtk_label_set_attributes (GTK_LABEL (w), attrs);
+ pango_attr_list_unref (attrs);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]