diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2020-04-06 11:30:48 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2020-04-06 11:30:48 +0100 |
commit | 02400588e413a7aafa14f61408b272c8a131a85e (patch) | |
tree | d5386c63f1325384d708c7a8ad37fdebaa244268 | |
parent | cbc28d2c9879afea534c5f48cc1fe1d251d2b114 (diff) | |
download | netsurf-02400588e413a7aafa14f61408b272c8a131a85e.tar.gz netsurf-02400588e413a7aafa14f61408b272c8a131a85e.tar.bz2 |
Local history: Improve look of keyboard nav cursor highlight.
-rw-r--r-- | desktop/local_history.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/desktop/local_history.c b/desktop/local_history.c index aa70ebb42..61073793f 100644 --- a/desktop/local_history.c +++ b/desktop/local_history.c @@ -173,17 +173,20 @@ redraw_entry(struct history *history, rect.y0 = entry->y - 1 + y; rect.x1 = entry->x + x + LOCAL_HISTORY_WIDTH; rect.y1 = entry->y + y + LOCAL_HISTORY_HEIGHT; - res = ctx->plot->rectangle(ctx, pstyle, &rect); - if (res != NSERROR_OK) { - return res; - } - /* If this is the cursor, show that */ - if (entry == cursor) { + /* Border */ + if (entry != cursor) { + /* Not cursor position */ + res = ctx->plot->rectangle(ctx, pstyle, &rect); + if (res != NSERROR_OK) { + return res; + } + } else { + /* Cursor position */ rect.x0 -= 1; rect.y0 -= 1; - rect.x1 += 2; - rect.y1 += 2; + rect.x1 += 1; + rect.y1 += 1; ctx->plot->rectangle(ctx, &pstyle_rect_cursor, &rect); } |