]> git.webhop.me Git - shellexec.git/commitdiff
fix position of hintbox for other resolutions
authorGetAway <get-away@t-online.de>
Thu, 12 Oct 2017 12:44:07 +0000 (14:44 +0200)
committerJacek Jendrzej <satbaby@kawaii.com>
Thu, 12 Oct 2017 13:35:31 +0000 (15:35 +0200)
shellexec.c
text.c

index 328c241a0f70f0334b882b727688eda05c8a5f6a..fa538809f60826a59aa7237f639558a00af99808 100644 (file)
@@ -12,7 +12,7 @@
 #include "pngw.h"
 
 
-#define SH_VERSION 2.12
+#define SH_VERSION 2.13
 
 static char CFG_FILE[128]="/var/tuxbox/config/shellexec.conf";
 
@@ -1804,8 +1804,8 @@ int main (int argc, char **argv)
        memcpy(lfb, lbb, var_screeninfo.xres*var_screeninfo.yres*sizeof(uint32_t));
        //blit();
 
-       startx = sx + (((ex-sx) - (fix_screeninfo.line_length-scale2res(200)))/2);
-       starty = sy + (((ey-sy) - (var_screeninfo.yres-scale2res(150)))/2);
+       startx = sx;
+       starty = sy;
 
        /* scale to resolution */
        FSIZE_BIG = scale2res(FSIZE_BIG);
diff --git a/text.c b/text.c
index 384ef99d8891a9610e3af6adf1428f4534bde80b..59fcb2ac62b4097db97ddf431637874421b85a85 100644 (file)
--- a/text.c
+++ b/text.c
@@ -493,11 +493,11 @@ void ShowMessage(char *mtitle, char *message, int wait)
        int ixw=scale2res(420);
        int iyw=wait?scale2res(327):scale2res(300);
        int lx=startx;
-       //int ly=starty;
+       int ly=starty;
        char *tdptr;
 
-       startx = sx + (((ex-sx) - ixw)/2);
-       //starty=sy;
+       startx = sx + ((ex-sx) - ixw)/2;
+       starty = sy + ((ey-sy) - iyw)/2 - iyw/2;
 
        //layout
        RenderBox(0+OFFSET_SMALL, scale2res(178)+OFFSET_SMALL, ixw+OFFSET_SMALL, iyw+OFFSET_SMALL, radius, COL_SHADOW_PLUS_0);
@@ -515,15 +515,16 @@ void ShowMessage(char *mtitle, char *message, int wait)
        free(tdptr);
 
        if(wait)
-       {       int offs=2*OFFSET_MED+OFFSET_SMALL; // 35
+       {
+               int offs=3*OFFSET_MED+OFFSET_SMALL;
                RenderBox(ixw/2-offs+OFFSET_SMALL, scale2res(286)+OFFSET_SMALL, ixw/2+offs+OFFSET_SMALL, scale2res(310)+OFFSET_SMALL, radius_small, COL_SHADOW_PLUS_0);
                RenderBox(ixw/2-offs, scale2res(286), ixw/2+offs, scale2res(310), radius_small, CMCS);
-               RenderString("OK", ixw/2-scale2res(25), scale2res(312), scale2res(50), CENTER, FSIZE_MED, CMCT);
+               RenderString("OK", ixw/2-scale2res(25), scale2res(310), scale2res(50), CENTER, FSIZE_MED, CMCT);
        }
        memcpy(lfb, lbb, var_screeninfo.xres*var_screeninfo.yres*sizeof(uint32_t));
 
        while(wait && (GetRCCode(300) != RC_OK));
 
-       startx=lx;
-       //starty=ly;
+       startx = lx;
+       starty = ly;
 }