From 02400588e413a7aafa14f61408b272c8a131a85e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 6 Apr 2020 11:30:48 +0100 Subject: Local history: Improve look of keyboard nav cursor highlight. --- desktop/local_history.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'desktop') 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); } -- cgit v1.2.3