[gtk/css-line-height2: 5/5] textview: Set line height from css




commit dd0dfe152ddc5a61e609a6fbe41e396eacac45c1
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Aug 7 12:30:11 2021 -0400

    textview: Set line height from css
    
    Set the line height in the default attributes from
    the CSS style.
    This makes line height work in GtkTextView.

 gtk/gtktextview.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 6e1a922e37..87618f4ee8 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -7659,6 +7659,8 @@ gtk_text_view_set_attributes_from_style (GtkTextView        *text_view,
     pango_font_description_free (values->font);
 
   values->font = gtk_css_style_get_pango_font (style);
+
+  values->line_height = _gtk_css_number_value_get (style->font->line_height, 1);
 }
 
 static void


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