diff options
author | Thomas White <taw@bitwiz.org.uk> | 2016-03-29 17:57:42 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2016-03-29 17:57:42 +0200 |
commit | b14d1503e73100f6973c813845632dfa05c583b9 (patch) | |
tree | cef1c7900d956ca57b8e6d9de4a2d780483a4b79 /src/sc_editor.c | |
parent | 0973dc26a6c384a09d898bc0bcfa41ee6f962129 (diff) |
Highlight the current paragraph
Has the nice effect of showing which slide is selected.
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r-- | src/sc_editor.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c index 379af90..5352028 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -403,8 +403,17 @@ static void draw_caret(cairo_t *cr, struct frame *fr, int cursor_para, size_t cursor_pos, int cursor_trail) { double cx, clow, chigh, h; + double cy, w; const double t = 1.8; + if ( get_para_highlight(fr, cursor_para, &cx, &cy, &w, &h) == 0 ) { + cairo_new_path(cr); + cairo_rectangle(cr, cx, cy, w, h); + cairo_set_source_rgba(cr, 0.7, 0.7, 1.0, 0.5); + cairo_set_line_width(cr, 5.0); + cairo_stroke(cr); + } + if ( get_cursor_pos(fr, cursor_para, cursor_pos+cursor_trail, &cx, &clow, &h) ) { |