[gtksourceview] Use the weight attribute instead of <b> for consistency



commit 64afd844cf4e3d926b739ee476a489ba0fd48658
Author: Paolo Borelli <porelli gnome org>
Date:   Mon Aug 3 12:13:11 2009 +0200

    Use the weight attribute instead of <b> for consistency

 gtksourceview/gtksourceview.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index 1449308..95dad75 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -1069,18 +1069,21 @@ line_renderer_size_func (GtkSourceGutter *gutter,
                          GtkCellRenderer *renderer,
                          GtkSourceView   *view)
 {
-	gchar *markup;
+	gchar *text;
 	gint count;
 
 	count = gtk_text_buffer_get_line_count (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
-	markup = g_strdup_printf ("<b>%d</b>", MAX(99, count));
+	text = g_strdup_printf ("%d", MAX(99, count));
 
+	/* measure with bold, just in case font is rendered larger */
 	g_object_set (G_OBJECT (renderer),
-                      "markup", markup,
-                      "xpad", 2,
-                      "ypad", 0,
-                      NULL);
-	g_free (markup);
+	              "text", text,
+	              "xpad", 2,
+	              "ypad", 0,
+	              "weight", PANGO_WEIGHT_BOLD,
+	               NULL);
+
+	g_free (text);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]