mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
- infoviewer.cpp: change width of infobar.txt-field ...
... in dependency from g_settings.infobar_progressbar
This commit is contained in:
@@ -1757,7 +1757,7 @@ void CInfoViewer::showInfoFile()
|
|||||||
/*if (recordModeActive)
|
/*if (recordModeActive)
|
||||||
return;*/
|
return;*/
|
||||||
char infotext[80];
|
char infotext[80];
|
||||||
int fd, xStart, xOffset, yStart, width, height, tWidth, tIndent;
|
int fd, xStart, yStart, width, height, iOffset, oOffset, tWidth, tIndent, pb_w;
|
||||||
ssize_t cnt;
|
ssize_t cnt;
|
||||||
|
|
||||||
fd = open("/tmp/infobar.txt", O_RDONLY); //read textcontent from this file
|
fd = open("/tmp/infobar.txt", O_RDONLY); //read textcontent from this file
|
||||||
@@ -1773,14 +1773,16 @@ void CInfoViewer::showInfoFile()
|
|||||||
}
|
}
|
||||||
infotext[cnt-1] = '\0';
|
infotext[cnt-1] = '\0';
|
||||||
|
|
||||||
xStart = BoxStartX + ChanWidth + 140; //140px space for the little rec/ts-bar
|
iOffset = RADIUS_SMALL; // inner left/right offset
|
||||||
xOffset = 5; //same value as the used RADIUS_SMALL
|
oOffset = 140; // outer left/right offset
|
||||||
|
pb_w = 112; // same value as int pb_w in display_Info()
|
||||||
|
xStart = BoxStartX + ChanWidth + oOffset;
|
||||||
yStart = BoxStartY;
|
yStart = BoxStartY;
|
||||||
width = BoxEndX - xStart - 225; //225px space for the progress-bar
|
width = BoxEndX - xStart - (g_settings.infobar_progressbar ? oOffset : oOffset + pb_w);
|
||||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight() + 2;
|
height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight() + 2;
|
||||||
tWidth = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth(infotext);
|
tWidth = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth(infotext);
|
||||||
if (tWidth < (width - (xOffset * 2)) )
|
if (tWidth < (width - (iOffset * 2)) )
|
||||||
tIndent = (width - (xOffset * 2) - tWidth) / 2;
|
tIndent = (width - (iOffset * 2) - tWidth) / 2;
|
||||||
else
|
else
|
||||||
tIndent = 0;
|
tIndent = 0;
|
||||||
//shadow
|
//shadow
|
||||||
@@ -1789,7 +1791,7 @@ void CInfoViewer::showInfoFile()
|
|||||||
frameBuffer->paintBoxRel(xStart, yStart, width, height, COL_INFOBAR_PLUS_0, RADIUS_SMALL, CORNER_ALL);
|
frameBuffer->paintBoxRel(xStart, yStart, width, height, COL_INFOBAR_PLUS_0, RADIUS_SMALL, CORNER_ALL);
|
||||||
//content
|
//content
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(
|
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(
|
||||||
xStart + xOffset + tIndent, yStart + height, width - xOffset, (std::string)infotext, COL_INFOBAR, height, false);
|
xStart + iOffset + tIndent, yStart + height, width - iOffset, (std::string)infotext, COL_INFOBAR, height, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInfoViewer::killTitle()
|
void CInfoViewer::killTitle()
|
||||||
|
Reference in New Issue
Block a user