border: display around all sides

(not just top and left edges)

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Zach DeCook 2022-07-08 23:38:13 -04:00 committed by Maarten van Gompel
parent 0cd0d5e1a1
commit f9bf42129a
2 changed files with 6 additions and 6 deletions

View File

@ -453,14 +453,14 @@ kbd_resize(struct kbd *kb, struct layout *layouts, uint8_t layoutcount) {
void void
draw_inset(struct drwsurf *ds, uint32_t x, uint32_t y, uint32_t width, draw_inset(struct drwsurf *ds, uint32_t x, uint32_t y, uint32_t width,
uint32_t height, uint32_t border, Color color) { uint32_t height, uint32_t border, Color color) {
drw_fill_rectangle(ds, color, x + border, y + border, width - border, drw_fill_rectangle(ds, color, x + border, y + border, width - (border * 2),
height - border); height - (border * 2));
} }
void void
draw_over_inset(struct drwsurf *ds, uint32_t x, uint32_t y, uint32_t width, draw_over_inset(struct drwsurf *ds, uint32_t x, uint32_t y, uint32_t width,
uint32_t height, uint32_t border, Color color) { uint32_t height, uint32_t border, Color color) {
drw_over_rectangle(ds, color, x + border, y + border, width - border, drw_over_rectangle(ds, color, x + border, y + border, width - (border * 2),
height - border); height - (border * 2));
} }
void void

View File

@ -5,8 +5,8 @@
/* how tall the keyboard should be by default (can be overriden) */ /* how tall the keyboard should be by default (can be overriden) */
#define KBD_PIXEL_LANDSCAPE_HEIGHT 120 #define KBD_PIXEL_LANDSCAPE_HEIGHT 120
/* spacing between keys */ /* spacing around each key */
#define KBD_KEY_BORDER 2 #define KBD_KEY_BORDER 1
/* layout declarations */ /* layout declarations */
enum layout_id { enum layout_id {