[gtksourceview/wip/chergert/gsv-gtk4: 174/259] stylescheme: simplify CSS selector for styling
- From: Christian Hergert <chergert src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtksourceview/wip/chergert/gsv-gtk4: 174/259] stylescheme: simplify CSS selector for styling
 
- Date: Mon, 21 Sep 2020 23:27:46 +0000 (UTC)
 
commit 6990078fc2bc27dca625e3b184fa9c9069a25b6f
Author: Christian Hergert <chergert redhat com>
Date:   Fri Apr 17 14:38:20 2020 -0700
    stylescheme: simplify CSS selector for styling
 gtksourceview/gtksourcestylescheme.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/gtksourceview/gtksourcestylescheme.c b/gtksourceview/gtksourcestylescheme.c
index 0df40736..834a7d21 100644
--- a/gtksourceview/gtksourcestylescheme.c
+++ b/gtksourceview/gtksourcestylescheme.c
@@ -890,23 +890,14 @@ generate_css_style (GtkSourceStyleScheme *scheme)
        style = gtk_source_style_scheme_get_style (scheme, STYLE_LINE_NUMBERS);
        if (style != NULL)
        {
-               append_css_style (final_style, style, "textview border");
-
-               /* Needed for GtkSourceGutter. In the ::draw callback,
-                * gtk_style_context_add_class() is called to add e.g. the
-                * "left" class. Because as of GTK+ 3.20 we cannot do the same
-                * to add the "border" subnode.
-                */
-               append_css_style (final_style, style, "textview .left");
-               append_css_style (final_style, style, "textview .right");
-               append_css_style (final_style, style, "textview .top");
-               append_css_style (final_style, style, "textview .bottom");
+               append_css_style (final_style, style, "textview border gutter");
        }
 
        style = gtk_source_style_scheme_get_style (scheme, STYLE_CURRENT_LINE_NUMBER);
        if (style != NULL)
        {
-               append_css_style (final_style, style, "textview .current-line-number");
+               append_css_style (final_style, style, "textview gutter.current-line-number");
+               append_css_style (final_style, style, "textview gutterrenderer.current-line-number");
        }
 
        apply_css_style_cursors (scheme, final_style);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]