summaryrefslogtreecommitdiff
path: root/gtk/gtktextview.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>2000-11-15 21:12:58 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-11-15 21:12:58 +0000
commitde49f2ce050d3581d848137ec037fcd3a92385d9 (patch)
treec7f03e9e42685af709721f0dae3d4bf13f3858db /gtk/gtktextview.c
parentc990d4ab1a1598cb9b252159f5b3730c3f96e7a4 (diff)
downloadgdk-pixbuf-de49f2ce050d3581d848137ec037fcd3a92385d9.tar.gz
ed Nov 15 16:02:20 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextview.c (changed_handler): Call scroll_calc_now() unconditionally, since we may need to update the horizontal scrollbars even if the height didn't change. * gtk/gtktextlayout.c (add_preedit_attrs): Always get the extra attrs, since some of them affect size. * gtk/gtktextdisplay.c (gtk_text_layout_draw): Factor in x_offset correctly.
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r--gtk/gtktextview.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index c1112fc8a..72ca67746 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -2141,11 +2141,11 @@ changed_handler (GtkTextLayout *layout,
yoffset_changed = TRUE;
}
- gtk_text_view_scroll_calc_now (text_view);
-
if (yoffset_changed)
gtk_adjustment_value_changed (get_vadjustment (text_view));
}
+
+ gtk_text_view_scroll_calc_now (text_view);
}
static void
@@ -3539,25 +3539,8 @@ gtk_text_view_scroll_calc_now (GtkTextView *text_view)
gtk_text_layout_get_size (text_view->layout, &width, &height);
-#if 0
- /* If the width is less than the screen width (likely
- if we have wrapping turned on for the whole widget),
- then we want to set the scroll region to the screen
- width. If the width is greater (wrapping off) then we
- probably want to set the scroll region to the width
- of the layout. I guess.
- */
-
- width = MAX (text_view->layout->screen_width, width);
- height = height;
-#endif
-
if (text_view->width != width || text_view->height != height)
{
-#if 0
- printf ("layout size set, widget width is %d\n",
- GTK_WIDGET (text_view)->allocation.width);
-#endif
text_view->width = width;
text_view->height = height;