[gtksourceview/wip/chergert/gsv-gtk4: 182/189] stylescheme: simplify CSS selector for styling



commit a263303ecc72e5a596985ebbc2be9f81172bdca2
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]