summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-08-16 10:05:21 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-08-16 10:05:21 +0100
commitc3ca5ab97962bf0ae7610df0675d696331fb444e (patch)
treee3903406b5f23d3a06d69f060c0e8e933fb323c6 /riscos
parent8a87058dc20980c3dffa3b6072d9ed7229a4eeaf (diff)
downloadnetsurf-c3ca5ab97962bf0ae7610df0675d696331fb444e.tar.gz
netsurf-c3ca5ab97962bf0ae7610df0675d696331fb444e.tar.bz2
Fix treeview code's inconsistant application of the plot origin. (Fixes various redraw glitches.)
Diffstat (limited to 'riscos')
-rw-r--r--riscos/treeview.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/riscos/treeview.c b/riscos/treeview.c
index d2ac36640..77276633e 100644
--- a/riscos/treeview.c
+++ b/riscos/treeview.c
@@ -450,21 +450,21 @@ void ro_treeview_redraw_loop(wimp_draw *redraw, ro_treeview *tv, osbool more)
};
while (more) {
- ro_plot_origin_x = redraw->box.x0 - redraw->xscroll;
- ro_plot_origin_y = redraw->box.y1 - redraw->yscroll;
+ ro_plot_origin_x = redraw->box.x0 + tv->origin.x -
+ redraw->xscroll;
+ ro_plot_origin_y = redraw->box.y1 + tv->origin.y -
+ redraw->yscroll;
if (tv != NULL && tv->tree != NULL) {
struct rect clip;
- clip.x0 = (redraw->clip.x0 -
- (ro_plot_origin_x + tv->origin.x)) / 2;
- clip.y0 = ((ro_plot_origin_y + tv->origin.y) -
- redraw->clip.y1) / 2;
+ clip.x0 = (redraw->clip.x0 - ro_plot_origin_x) / 2;
+ clip.y0 = (ro_plot_origin_y - redraw->clip.y1) / 2;
/* Treeview text alwyas has flat background colour,
* so disable unnecessary background blending */
no_font_blending = true;
- tree_draw(tv->tree, tv->origin.x/2, -(tv->origin.y/2),
+ tree_draw(tv->tree, 0, 0,
clip.x0, clip.y0,
(redraw->clip.x1 - redraw->clip.x0)/2,
(redraw->clip.y1 - redraw->clip.y0)/2,