summaryrefslogtreecommitdiff
path: root/gtk/gtktextattributes.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-05 22:22:50 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-22 15:15:50 -0400
commit66b297e408bc3d37027492aa9460cb470d0bc897 (patch)
tree89772a690f4afd0f12233d5aa848fea89d4f8e9f /gtk/gtktextattributes.c
parentbbd2b255a39f0ee3c6d4976b9d22d91b96192ab7 (diff)
downloadgtk+-66b297e408bc3d37027492aa9460cb470d0bc897.tar.gz
textview: Add line height plumbing
This adds a line-height property to GtkTexttag and a line_height field to GtkTextAttributes, and translates it to a pango attribute.
Diffstat (limited to 'gtk/gtktextattributes.c')
-rw-r--r--gtk/gtktextattributes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtktextattributes.c b/gtk/gtktextattributes.c
index 738caa6bc1..fbc63a7d63 100644
--- a/gtk/gtktextattributes.c
+++ b/gtk/gtktextattributes.c
@@ -387,6 +387,9 @@ _gtk_text_attributes_fill_from_tags (GtkTextAttributes *dest,
if (tag->priv->pixels_inside_wrap_set)
dest->pixels_inside_wrap = vals->pixels_inside_wrap;
+ if (tag->priv->line_height_set)
+ dest->line_height = vals->line_height;
+
if (tag->priv->tabs_set)
{
if (dest->tabs)
@@ -457,6 +460,7 @@ _gtk_text_tag_affects_size (GtkTextTag *tag)
priv->pixels_above_lines_set ||
priv->pixels_below_lines_set ||
priv->pixels_inside_wrap_set ||
+ priv->line_height_set ||
priv->tabs_set ||
priv->underline_set ||
priv->overline_set ||