diff options
author | James Magahern <james@magahern.com> | 2019-01-19 16:49:09 -0800 |
---|---|---|
committer | James Magahern <james@magahern.com> | 2019-01-19 16:49:09 -0800 |
commit | 0c214a8fbb2819be14b4e305f1cef3e43b1a2be8 (patch) | |
tree | e462c5edb9b905078e42094aa6fe64552e4d28b1 /src/render.c | |
parent | Switch to using gresources for svgs (diff) |
Start working on accept anim
Diffstat (limited to 'src/render.c')
-rw-r--r-- | src/render.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/render.c b/src/render.c index 1439b08..214af8b 100644 --- a/src/render.c +++ b/src/render.c @@ -42,7 +42,6 @@ void draw_logo(saver_state_t *state) g_bytes_unref(bytes); if (error != NULL) { fprintf(stderr, "Error loading logo SVG\n"); - return; } } @@ -132,7 +131,13 @@ void draw_password_field(saver_state_t *state) // Draw cursor cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, state->cursor_opacity); - cairo_rectangle(cr, field_x + cursor_offset_x, field_y, cursor_width, cursor_height); + if (state->cursor_animating) { + cairo_rectangle(cr, field_x + cursor_offset_x, field_y, cursor_width, cursor_height); + } else { + // Fill asterisks + cairo_rectangle(cr, field_x, field_y, cursor_offset_x, cursor_height); + } cairo_fill(cr); + } |