[gtk/wip/chergert/revert-top-margin] Revert "textview: fix yoffset position when top_margin is set"




commit fc701baef88de89902e08a96bbf6e807acd5049b
Author: Christian Hergert <chergert redhat com>
Date:   Thu Aug 5 11:52:45 2021 -0700

    Revert "textview: fix yoffset position when top_margin is set"
    
    This reverts commit 908b1e5e1214afc01440bc07a8d937222f411f38.
    
    This commit broke top-margin altogether.

 gtk/gtktextview.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index d6673bed62..6e1a922e37 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4892,7 +4892,7 @@ changed_handler (GtkTextLayout     *layout,
 
       gtk_text_layout_get_line_yrange (layout, &first, &new_first_para_top, NULL);
 
-      old_first_para_top = priv->yoffset - priv->first_para_pixels;
+      old_first_para_top = priv->yoffset - priv->first_para_pixels + priv->top_margin;
 
       if (new_first_para_top != old_first_para_top)
         {


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