]> git.webhop.me Git - shellexec.git/commitdiff
shellexec: use OFFSET_MIN for better bg detection
authorGetAway <get-away@t-online.de>
Thu, 12 Oct 2017 12:47:05 +0000 (14:47 +0200)
committerJacek Jendrzej <satbaby@kawaii.com>
Thu, 12 Oct 2017 13:35:31 +0000 (15:35 +0200)
shellexec.c
text.c

index fa538809f60826a59aa7237f639558a00af99808..1994e83646c9b863328437b791b31fdea52bd85b 100644 (file)
@@ -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 59fcb2ac62b4097db97ddf431637874421b85a85..5df9d6799f6ea0a40e70cff5be3187b1572260a6 100644 (file)
--- 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);