[gtksourceview] Do not use bold line numbers if cursor is hidden
- From: Paolo Borelli <pborelli src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtksourceview] Do not use bold line numbers if cursor is hidden
- Date: Fri, 14 Aug 2009 19:13:20 +0000 (UTC)
commit e41e7627148ac4666e54f8ffdbc2ddf88cdca272
Author: Paolo Borelli <pborelli gnome org>
Date: Fri Aug 14 21:13:37 2009 +0200
Do not use bold line numbers if cursor is hidden
gtksourceview/gtksourceview.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index 95dad75..11c1b0f 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -1036,6 +1036,16 @@ line_renderer_data_func (GtkSourceGutter *gutter,
GtkSourceView *view)
{
gchar *text;
+ int weight;
+
+ if (current_line && gtk_text_view_get_cursor_visible (GTK_TEXT_VIEW (view)))
+ {
+ weight = PANGO_WEIGHT_BOLD;
+ }
+ else
+ {
+ weight = PANGO_WEIGHT_NORMAL;
+ }
text = g_strdup_printf ("%d", line_number + 1);
g_object_set (G_OBJECT (renderer),
@@ -1044,7 +1054,7 @@ line_renderer_data_func (GtkSourceGutter *gutter,
"yalign", 0.0,
"xpad", 2,
"ypad", 0,
- "weight", current_line ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL,
+ "weight", weight,
"mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]