[pango/visible-things: 26/32] layout: Use a show attribute



commit 283c2d998b8efc2901dafaf9ed233782cc612214
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jul 13 19:39:17 2019 -0400

    layout: Use a show attribute
    
    Use an attribute to show line breaks in
    single-paragraph mode.

 pango/pango-layout.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 5db6f7e1..b3303b3d 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -3977,6 +3977,12 @@ pango_layout_get_effective_attributes (PangoLayout *layout)
       pango_attr_list_insert_before (attrs, attr);
     }
 
+  if (layout->single_paragraph)
+    {
+      PangoAttribute *attr = pango_attr_show_new (PANGO_SHOW_LINE_BREAKS);
+      pango_attr_list_insert_before (attrs, attr);
+    }
+
   return attrs;
 }
 


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