From: GetAway Date: Thu, 12 Oct 2017 12:47:05 +0000 (+0200) Subject: shellexec: use OFFSET_MIN for better bg detection X-Git-Url: https://git.webhop.me/?a=commitdiff_plain;h=795cc8634105589daa506a2b92ce39787d97411b;p=shellexec.git shellexec: use OFFSET_MIN for better bg detection --- diff --git a/shellexec.c b/shellexec.c index fa53880..1994e83 100644 --- a/shellexec.c +++ b/shellexec.c @@ -12,7 +12,7 @@ #include "pngw.h" -#define SH_VERSION 2.13 +#define SH_VERSION 2.14 static char CFG_FILE[128]="/var/tuxbox/config/shellexec.conf"; @@ -1488,7 +1488,7 @@ static void ShowInfo(MENU *m, int knew ) if(ccenter) { stlen=GetStringLen(xoffs, dstr, MED); - RenderBox(xoffs+(ixw-xoffs-sbw)/2-stlen/2, my+soffs-ldy, xoffs+(ixw-xoffs-sbw)/2+stlen/2+3*OFFSET_SMALL/*15*/, my+soffs, FILL, CMC); + RenderBox(xoffs+(ixw-xoffs-sbw)/2-stlen/2, my+soffs-ldy, xoffs+(ixw-xoffs-sbw)/2+stlen/2+3*OFFSET_SMALL, my+soffs, FILL, CMC); RenderString(dstr, xoffs, my+soffs-(dy-FSIZE_MED)/2, ixw-sbw, CENTER, MED, CMCIT); } } diff --git a/text.c b/text.c index 59fcb2a..5df9d67 100644 --- a/text.c +++ b/text.c @@ -291,7 +291,7 @@ int RenderChar(FT_ULong currentchar, int _sx, int _sy, int _ex, int color) if (_sx + sbit->xadvance >= _ex) return -1; /* limit to maxwidth */ - uint32_t bgcolor = *(lbb + (starty + _sy - _d - 1) * swidth + (startx + _sx + sbit->left)); + uint32_t bgcolor = *(lbb + (starty + _sy - _d - 1) * swidth + (startx + _sx + OFFSET_MIN + sbit->left)); uint32_t fgcolor = bgra[color]; uint32_t *colors = lookup_colors(fgcolor, bgcolor); uint32_t *p = lbb + (startx + _sx + sbit->left + kerning.x) + swidth * (starty + _sy - sbit->top - _d);