projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc6ecc8
)
textview: fix yoffset position when top_margin is set
author
Christian Hergert
<chergert@redhat.com>
Thu, 29 Jul 2021 23:45:04 +0000
(16:45 -0700)
committer
Christian Hergert
<chergert@redhat.com>
Thu, 29 Jul 2021 23:45:04 +0000
(16:45 -0700)
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
patch
|
blob
|
history
diff --git
a/gtk/gtktextview.c
b/gtk/gtktextview.c
index 71c48ab844302abaeb5cc69594bb0f3ffea839cd..3f5836f0aa9f2dcff2d40b240f63e3b99fb893c4 100644
(file)
--- 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)
{