summaryrefslogtreecommitdiff
path: root/gui/render.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-19 05:22:42 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-19 05:22:42 -0300
commitece0da7474b99d0958c0d4731fda670cfb1f6831 (patch)
treebd5c37845118679d7899a229b9f1e5a47cf5bb80 /gui/render.c
parent8349ddc329c6779fcca7b3207dd0005d85bc0109 (diff)
downloadeeshow-ece0da7474b99d0958c0d4731fda670cfb1f6831.tar.gz
eeshow-ece0da7474b99d0958c0d4731fda670cfb1f6831.tar.bz2
eeshow-ece0da7474b99d0958c0d4731fda670cfb1f6831.zip
eeshow/gui/: use overlay_draw_all_d for glabels, due to offsets
The offsets can move the coordinates across zero, thus flipping the alignment. overlay_draw_all_d is immune to this.
Diffstat (limited to 'gui/render.c')
-rw-r--r--gui/render.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gui/render.c b/gui/render.c
index 3d3acc8..ee54412 100644
--- a/gui/render.c
+++ b/gui/render.c
@@ -89,10 +89,12 @@ static gboolean on_draw_event(GtkWidget *widget, cairo_t *cr,
VCS_OVERLAYS_X,
VCS_OVERLAYS_Y + (ctx->showing_history ? ctx->hist_y_offset : 0),
0, 1);
- overlay_draw_all(ctx->pop_underlays, cr, ctx->pop_x, ctx->pop_y);
- overlay_draw_all(ctx->pop_overlays, cr,
- ctx->pop_x + sign1(ctx->pop_x) * GLABEL_STACK_PADDING,
- ctx->pop_y + sign1(ctx->pop_y) * GLABEL_STACK_PADDING);
+ overlay_draw_all_d(ctx->pop_underlays, cr, ctx->pop_x, ctx->pop_y,
+ ctx->pop_dx, ctx->pop_dy);
+ overlay_draw_all_d(ctx->pop_overlays, cr,
+ ctx->pop_x + ctx->pop_dx * GLABEL_STACK_PADDING,
+ ctx->pop_y + ctx->pop_dy * GLABEL_STACK_PADDING,
+ ctx->pop_dx, ctx->pop_dy);
return FALSE;
}