summaryrefslogtreecommitdiff
path: root/gui/render.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-29 01:22:33 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-29 01:22:33 -0300
commit14c368e003feb2dfd83429bee459e6499bb0be8d (patch)
tree348c6500dfdd4e714ab0a93da576b2db0c0e2787 /gui/render.c
parent3d994873533bfa4228b9783908e8027f81984701 (diff)
downloadeeshow-14c368e003feb2dfd83429bee459e6499bb0be8d.tar.gz
eeshow-14c368e003feb2dfd83429bee459e6499bb0be8d.tar.bz2
eeshow-14c368e003feb2dfd83429bee459e6499bb0be8d.zip
gui/render.c (on_draw_event): move history drawing to history_draw_event
Diffstat (limited to 'gui/render.c')
-rw-r--r--gui/render.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/gui/render.c b/gui/render.c
index c2a9622..48003f5 100644
--- a/gui/render.c
+++ b/gui/render.c
@@ -33,9 +33,6 @@
#include "gui/common.h"
-#define VCS_OVERLAYS_X 5
-#define VCS_OVERLAYS_Y 5
-
#define SHEET_OVERLAYS_X -10
#define SHEET_OVERLAYS_Y 10
@@ -227,11 +224,9 @@ static gboolean on_draw_event(GtkWidget *widget, cairo_t *cr,
overlay_draw_all(gui->sheet_overlays, cr,
SHEET_OVERLAYS_X, SHEET_OVERLAYS_Y);
- overlay_draw_all_d(gui->hist_overlays, cr,
- VCS_OVERLAYS_X,
- VCS_OVERLAYS_Y +
- (gui->mode == showing_history ? gui->hist_y_offset : 0),
- 0, 1);
+ if (gui->mode != showing_history)
+ overlay_draw_all_d(gui->hist_overlays, cr,
+ VCS_OVERLAYS_X, VCS_OVERLAYS_Y, 0, 1);
overlay_draw_all_d(gui->pop_underlays, cr, gui->pop_x, gui->pop_y,
gui->pop_dx, gui->pop_dy);
overlay_draw_all_d(gui->pop_overlays, cr,
@@ -239,8 +234,17 @@ static gboolean on_draw_event(GtkWidget *widget, cairo_t *cr,
gui->pop_y + gui->pop_dy * GLABEL_STACK_PADDING,
gui->pop_dx, gui->pop_dy);
- if (gui->mode == showing_index)
+ switch (gui->mode) {
+ case showing_history:
+ history_draw_event(gui, cr);
+ break;
+ case showing_index:
index_draw_event(gui, cr);
+ break;
+ default:
+ break;
+ }
+ if (gui->mode == showing_index)
timer_show(cr);