From f9bf42129a8f84cd7e1b887e9359f01fb56718ff Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Fri, 8 Jul 2022 23:38:13 -0400 Subject: [PATCH] border: display around all sides (not just top and left edges) Signed-off-by: Maarten van Gompel --- keyboard.c | 8 ++++---- layout.mobintl.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboard.c b/keyboard.c index 29b4fee..5a1d708 100644 --- a/keyboard.c +++ b/keyboard.c @@ -453,14 +453,14 @@ kbd_resize(struct kbd *kb, struct layout *layouts, uint8_t layoutcount) { void draw_inset(struct drwsurf *ds, uint32_t x, uint32_t y, uint32_t width, uint32_t height, uint32_t border, Color color) { - drw_fill_rectangle(ds, color, x + border, y + border, width - border, - height - border); + drw_fill_rectangle(ds, color, x + border, y + border, width - (border * 2), + height - (border * 2)); } void draw_over_inset(struct drwsurf *ds, uint32_t x, uint32_t y, uint32_t width, uint32_t height, uint32_t border, Color color) { - drw_over_rectangle(ds, color, x + border, y + border, width - border, - height - border); + drw_over_rectangle(ds, color, x + border, y + border, width - (border * 2), + height - (border * 2)); } void diff --git a/layout.mobintl.h b/layout.mobintl.h index 8073786..6d459da 100644 --- a/layout.mobintl.h +++ b/layout.mobintl.h @@ -5,8 +5,8 @@ /* how tall the keyboard should be by default (can be overriden) */ #define KBD_PIXEL_LANDSCAPE_HEIGHT 120 -/* spacing between keys */ -#define KBD_KEY_BORDER 2 +/* spacing around each key */ +#define KBD_KEY_BORDER 1 /* layout declarations */ enum layout_id {