mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
CInfoViewer: try to fix channel number allignment
Allignment was broken on different font size.
This commit is contained in:
@@ -777,10 +777,19 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap
|
|||||||
if ((!logo_ok && g_settings.infobar_show_channellogo < 2) || g_settings.infobar_show_channellogo == 2 || g_settings.infobar_show_channellogo == 4) // no logo in numberbox
|
if ((!logo_ok && g_settings.infobar_show_channellogo < 2) || g_settings.infobar_show_channellogo == 2 || g_settings.infobar_show_channellogo == 4) // no logo in numberbox
|
||||||
{
|
{
|
||||||
// show number in numberbox
|
// show number in numberbox
|
||||||
int tmpwidth = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(strChanNum);
|
int h_tmp = numbox->getHeight();
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->RenderString(
|
int y_tmp = numbox->getYPos() + 5*100/h_tmp; //5%
|
||||||
BoxStartX + (ChanWidth - tmpwidth) / 2, ChanNumYPos,
|
if (g_settings.infobar_sat_display){
|
||||||
ChanWidth, strChanNum, col_NumBoxText);
|
int h_sfont = g_SignalFont->getHeight();
|
||||||
|
h_tmp -= h_sfont;
|
||||||
|
y_tmp += h_sfont;
|
||||||
|
}
|
||||||
|
y_tmp += h_tmp/2 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight()/2;
|
||||||
|
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->RenderString(BoxStartX + (ChanWidth-g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(strChanNum))/2,
|
||||||
|
y_tmp,
|
||||||
|
ChanWidth,
|
||||||
|
strChanNum,
|
||||||
|
col_NumBoxText);
|
||||||
}
|
}
|
||||||
if (ChannelLogoMode == 1 || ( g_settings.infobar_show_channellogo == 3 && !logo_ok) || g_settings.infobar_show_channellogo == 6 ) /* channel number besides channel name */
|
if (ChannelLogoMode == 1 || ( g_settings.infobar_show_channellogo == 3 && !logo_ok) || g_settings.infobar_show_channellogo == 6 ) /* channel number besides channel name */
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user