From 2b6968f9115150ec5a7e43b22806e0e12d320d70 Mon Sep 17 00:00:00 2001 From: phillbush Date: Sat, 16 May 2020 00:58:32 -0300 Subject: [PATCH] A better triangle Now the triangle indicating submenus is smaller and better looking. --- xmenu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xmenu.c b/xmenu.c index 4bd78cb..9e9d17b 100644 --- a/xmenu.c +++ b/xmenu.c @@ -493,13 +493,13 @@ drawmenu(void) /* draw triangle, if item contains a submenu */ if (item->submenu != NULL) { - int trianglex = geom.itemw - (geom.itemb + dc.fonth); - int triangley = item->y + geom.itemb; + int trianglex = geom.itemw - dc.fonth + geom.itemb - 1; + int triangley = item->y + (3 * item->h)/8 -1; XPoint triangle[] = { {trianglex, triangley}, - {trianglex + dc.fonth, triangley + dc.fonth/2}, - {trianglex, triangley + dc.fonth}, + {trianglex + item->h/8 + 1, item->y + item->h/2}, + {trianglex, triangley + item->h/4 + 2}, {trianglex, triangley} };