From bbdc80bddefe0b858274fa8d714dad4299b2cbcd Mon Sep 17 00:00:00 2001 From: mrdotx Date: Sun, 1 Aug 2021 09:22:04 +0200 Subject: [PATCH] minor correction of the border height --- pinentry-dmenu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pinentry-dmenu.c b/pinentry-dmenu.c index 0b3b365..a382909 100644 --- a/pinentry-dmenu.c +++ b/pinentry-dmenu.c @@ -292,7 +292,7 @@ drawwin(void) { drw_setscheme(drw, scheme[SchemeDesc]); if (center) { drw_text(drw, promptw + ppromptw, lineheight, centerwidth, - bh + borderwidth * 2, lrpad / 2, + bh + borderwidth, lrpad / 2, pinentry_info->description, 0); } else { drw_text(drw, pb, 0, pbw, bh, lrpad / 2, @@ -357,7 +357,7 @@ setup(void) { /* Calculate menu geometry */ bh = MAX(drw->fonts->h + 2, lineheight); /* at least line height */ - mh = (center) ? bh * 2 : bh; + mh = bh; #ifdef XINERAMA info = XineramaQueryScreens(dpy, &n); @@ -395,6 +395,7 @@ setup(void) { if (center) { mw = MIN(centerwidth, info[i].width); + mh *= 2; x = info[i].x_org + ((info[i].width - mw) / 2); y = info[i].y_org + ((info[i].height - mh) / 2); } else { @@ -413,6 +414,7 @@ setup(void) { if (center) { mw = MIN(centerwidth, wa.width); + mh *= 2; x = (wa.width - mw) / 2; y = (wa.height - mh) / 2; } else {