- infoviewer: fix shadow in showInfoFile() (patch by svenhoefer)

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1625 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
striper
2011-08-22 11:10:27 +00:00
parent 04870c97f1
commit 4bbcd5962f

View File

@@ -1877,7 +1877,7 @@ void CInfoViewer::showInfoFile()
if (recordModeActive)
return;
char infotext[80];
int fd, xStart, xEnd, height, r;
int fd, xStart, yStart, width, height, radius;
ssize_t cnt;
fd = open("/tmp/infobar.txt", O_RDONLY); //Datei aus welcher der Text ausgelesen wird
@@ -1893,15 +1893,18 @@ void CInfoViewer::showInfoFile()
}
infotext[cnt-1] = '\0';
xStart = BoxStartX + ChanWidth + 140; // Abstand rechst vom Aufnahmeicon
xEnd = BoxEndX - 225; // Abstand links von der Progressbar
xStart = BoxStartX + ChanWidth + 140; //Abstand rechts vom Aufnahmeicon
yStart = BoxStartY;
width = BoxEndX - xStart - 225;
height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight() + 2;
r = height / 3;
radius = height / 3;
//shadow
frameBuffer->paintBoxRel(xStart + SHADOW_OFFSET, yStart + SHADOW_OFFSET, width, height, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_SMALL, CORNER_ALL);
//background
frameBuffer->paintBox(xStart, BoxStartY, xEnd, BoxStartY + height, COL_INFOBAR_PLUS_0, RADIUS_SMALL, CORNER_ALL); //round
frameBuffer->paintBoxRel(xStart, yStart, width, height, COL_INFOBAR_PLUS_0, RADIUS_SMALL, CORNER_ALL);
//content
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(
xStart + r, BoxStartY + height, xEnd - xStart - r*2, (std::string)infotext, COL_INFOBAR, height, false);
xStart + radius, yStart + height, width - radius, (std::string)infotext, COL_INFOBAR, height, false);
}