aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--widgets/e-text/e-text.c16
-rw-r--r--widgets/text/e-text.c16
3 files changed, 20 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index dd96e6fc65..9acc5a1a66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2000-06-21 Christopher James Lahey <clahey@helixcode.com>
+ * widgets/e-text/e-text.c: Fixed some vertical scroll bugs.
+
+2000-06-21 Christopher James Lahey <clahey@helixcode.com>
+
* widgets/e-text/e-text.c: Fix a bug with intial vertical scroll.
2000-06-21 Christopher James Lahey <clahey@helixcode.com>
diff --git a/widgets/e-text/e-text.c b/widgets/e-text/e-text.c
index 614c87af97..6b371e0ba3 100644
--- a/widgets/e-text/e-text.c
+++ b/widgets/e-text/e-text.c
@@ -1388,11 +1388,11 @@ e_text_reflow (GnomeCanvasItem *item, int flags)
text->xofs_edit = 2 + x - text->clip_width;
}
- if ((text->font->ascent + text->font->descent) * (i - 1) < text->yofs_edit)
- text->yofs_edit = (text->font->ascent + text->font->descent) * (i - 1);
+ if ((text->font->ascent + text->font->descent) * i < text->yofs_edit)
+ text->yofs_edit = (text->font->ascent + text->font->descent) * i;
- if (2 + (text->font->ascent + text->font->descent) * i - text->clip_height > text->yofs_edit)
- text->yofs_edit = 2 + (text->font->ascent + text->font->descent) * i - text->clip_height;
+ if ((text->font->ascent + text->font->descent) * (i + 1) - (text->clip_height != -1 ? text->clip_height : text->height) > text->yofs_edit)
+ text->yofs_edit = (text->font->ascent + text->font->descent) * (i + 1) - (text->clip_height != -1 ? text->clip_height : text->height);
}
if ( text->needs_calc_height ) {
calc_height (text);
@@ -2871,11 +2871,11 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
text->xofs_edit = 2 + x - text->clip_width;
}
- if ((text->font->ascent + text->font->descent) * (i - 1) < text->yofs_edit)
- text->yofs_edit = (text->font->ascent + text->font->descent) * (i - 1);
+ if ((text->font->ascent + text->font->descent) * i < text->yofs_edit)
+ text->yofs_edit = (text->font->ascent + text->font->descent) * i;
- if (2 + (text->font->ascent + text->font->descent) * i - text->clip_height > text->yofs_edit)
- text->yofs_edit = 2 + (text->font->ascent + text->font->descent) * i - text->clip_height;
+ if ((text->font->ascent + text->font->descent) * (i + 1) - (text->clip_height != -1 ? text->clip_height : text->height) > text->yofs_edit)
+ text->yofs_edit = (text->font->ascent + text->font->descent) * (i + 1) - (text->clip_height != -1 ? text->clip_height : text->height);
}
text->needs_redraw = 1;
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 614c87af97..6b371e0ba3 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -1388,11 +1388,11 @@ e_text_reflow (GnomeCanvasItem *item, int flags)
text->xofs_edit = 2 + x - text->clip_width;
}
- if ((text->font->ascent + text->font->descent) * (i - 1) < text->yofs_edit)
- text->yofs_edit = (text->font->ascent + text->font->descent) * (i - 1);
+ if ((text->font->ascent + text->font->descent) * i < text->yofs_edit)
+ text->yofs_edit = (text->font->ascent + text->font->descent) * i;
- if (2 + (text->font->ascent + text->font->descent) * i - text->clip_height > text->yofs_edit)
- text->yofs_edit = 2 + (text->font->ascent + text->font->descent) * i - text->clip_height;
+ if ((text->font->ascent + text->font->descent) * (i + 1) - (text->clip_height != -1 ? text->clip_height : text->height) > text->yofs_edit)
+ text->yofs_edit = (text->font->ascent + text->font->descent) * (i + 1) - (text->clip_height != -1 ? text->clip_height : text->height);
}
if ( text->needs_calc_height ) {
calc_height (text);
@@ -2871,11 +2871,11 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
text->xofs_edit = 2 + x - text->clip_width;
}
- if ((text->font->ascent + text->font->descent) * (i - 1) < text->yofs_edit)
- text->yofs_edit = (text->font->ascent + text->font->descent) * (i - 1);
+ if ((text->font->ascent + text->font->descent) * i < text->yofs_edit)
+ text->yofs_edit = (text->font->ascent + text->font->descent) * i;
- if (2 + (text->font->ascent + text->font->descent) * i - text->clip_height > text->yofs_edit)
- text->yofs_edit = 2 + (text->font->ascent + text->font->descent) * i - text->clip_height;
+ if ((text->font->ascent + text->font->descent) * (i + 1) - (text->clip_height != -1 ? text->clip_height : text->height) > text->yofs_edit)
+ text->yofs_edit = (text->font->ascent + text->font->descent) * (i + 1) - (text->clip_height != -1 ? text->clip_height : text->height);
}
text->needs_redraw = 1;