[gtk/wip/chergert/fix-4134] textview: fix yoffset position when top_margin is set
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/fix-4134] textview: fix yoffset position when top_margin is set
- Date: Thu, 29 Jul 2021 23:46:37 +0000 (UTC)
commit 908b1e5e1214afc01440bc07a8d937222f411f38
Author: Christian Hergert <chergert redhat com>
Date: Thu Jul 29 16:45:04 2021 -0700
textview: fix yoffset position when top_margin is set
This doesn't need to be included in the calculation or it will cause the
yoffset to continually shift while the window is resized.
Fixes #4134
gtk/gtktextview.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 71c48ab844..3f5836f0aa 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 + priv->top_margin;
+ old_first_para_top = priv->yoffset - priv->first_para_pixels;
if (new_first_para_top != old_first_para_top)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]