[gtksourceview] gutterrenderertext: fix foreground color calculation



commit d96b464e4c89815b7f819312e97a4ba7612382fe
Author: Christian Hergert <chergert redhat com>
Date:   Sun Dec 26 14:55:21 2021 -0800

    gutterrenderertext: fix foreground color calculation
    
    Pango takes values between 0 and 65535.

 gtksourceview/gtksourcegutterrenderertext.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtksourceview/gtksourcegutterrenderertext.c b/gtksourceview/gtksourcegutterrenderertext.c
index 36faa151..9fa87857 100644
--- a/gtksourceview/gtksourcegutterrenderertext.c
+++ b/gtksourceview/gtksourcegutterrenderertext.c
@@ -115,9 +115,9 @@ gtk_source_gutter_renderer_text_begin (GtkSourceGutterRenderer *renderer,
 
        if (_gtk_source_view_get_current_line_number_color (view, &current))
        {
-               priv->current_line_color = pango_attr_foreground_new (current.red * 255,
-                                                                     current.green * 255,
-                                                                     current.blue * 255);
+               priv->current_line_color = pango_attr_foreground_new (current.red * 65535,
+                                                                     current.green * 65535,
+                                                                     current.blue * 65535);
        }
 
        if (_gtk_source_view_get_current_line_number_bold (view))


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