From 93cde4831bca7055c38a1d6246fdcb84df07f7ec Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 31 May 2019 20:32:02 +0000 Subject: bemenu: add --line-height / -H option Text is displayed vertically centered in a line. If unspecified, or 0, the previous behaviour of making the height the size of the text, plus two pixels on either side, is used, so there will be no change in behaviour if this option is not used. Fixes https://github.com/Cloudef/bemenu/issues/44. --- lib/menu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/menu.c') diff --git a/lib/menu.c b/lib/menu.c index e876126..c46a2d6 100644 --- a/lib/menu.c +++ b/lib/menu.c @@ -266,6 +266,20 @@ bm_menu_get_font(const struct bm_menu *menu) return menu->font.name; } +void +bm_menu_set_line_height(struct bm_menu *menu, uint32_t line_height) +{ + assert(menu); + menu->line_height = line_height; +} + +uint32_t +bm_menu_get_line_height(struct bm_menu *menu) +{ + assert(menu); + return menu->line_height; +} + bool bm_menu_set_color(struct bm_menu *menu, enum bm_color color, const char *hex) { -- cgit v1.2.3-70-g09d2