[gnome-characters/bilelmoussaoui/gtk4: 28/76] characters view: fix chars rendering




commit 8e48cb133c162d09ce9abc90f518df52510dd36b
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date:   Sun Nov 21 15:35:25 2021 +0100

    characters view: fix chars rendering

 src/charactersView.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/charactersView.js b/src/charactersView.js
index 65e4ee8..929c606 100644
--- a/src/charactersView.js
+++ b/src/charactersView.js
@@ -53,13 +53,14 @@ const CharacterListRow = GObject.registerClass({
         this._styleContext = styleContext;
         // Draw baseline.
         // FIXME: Pick the baseline color from CSS.
-        let fg_color = this._styleContext.lookup_color('accent_color');
-        cr.setSourceRGBA(114.0 / 255.0, 159.0 / 255.0, 207.0 / 255.0, 1.0);
+        let accent_color = this._styleContext.lookup_color('accent_color')[1];
+        Gdk.cairo_set_source_rgba(cr, accent_color);
         cr.setLineWidth(0.5);
         cr.moveTo(x, y + BASELINE_OFFSET * height);
         cr.relLineTo(width, 0);
         cr.stroke();
-        cr.setSourceRGBA(fg_color.red, fg_color.green, fg_color.blue, fg_color.alpha);
+        let fg_color = this._styleContext.get_color();
+        Gdk.cairo_set_source_rgba(cr, fg_color);
 
         // Draw characters.  Do centering and attach to the baseline.
         let cellSize = getCellSize(this._fontDescription);


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