mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
CInfoViewer: Fix display progress bar with large fonts
Origin commit data
------------------
Branch: ni/coolstream
Commit: 0be3cb731d
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-02-13 (Thu, 13 Feb 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -219,10 +219,15 @@ void CInfoViewer::start ()
|
|||||||
ChanNameY = BoxStartY + (ChanHeight / 2) + SHADOW_OFFSET; //oberkante schatten?
|
ChanNameY = BoxStartY + (ChanHeight / 2) + SHADOW_OFFSET; //oberkante schatten?
|
||||||
ChanInfoX = BoxStartX + (ChanWidth / 3);
|
ChanInfoX = BoxStartX + (ChanWidth / 3);
|
||||||
|
|
||||||
time_height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getHeight()+5;
|
time_height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getHeight();
|
||||||
time_left_width = 2 * g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getWidth(); /* still a kludge */
|
time_left_width = 2 * g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getWidth(); /* still a kludge */
|
||||||
time_dot_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(":");
|
time_dot_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(":");
|
||||||
time_width = time_left_width* 2+ time_dot_width;
|
time_width = time_left_width* 2+ time_dot_width;
|
||||||
|
|
||||||
|
if (clock) {
|
||||||
|
delete clock;
|
||||||
|
clock = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInfoViewer::changePB()
|
void CInfoViewer::changePB()
|
||||||
@@ -257,7 +262,6 @@ void CInfoViewer::paintTime (bool show_dot)
|
|||||||
if (clock == NULL){
|
if (clock == NULL){
|
||||||
clock = new CComponentsFrmClock();
|
clock = new CComponentsFrmClock();
|
||||||
clock->doPaintBg(false);
|
clock->doPaintBg(false);
|
||||||
clock->setClockActiv(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clock->setColorBody(COL_INFOBAR_PLUS_0);
|
clock->setColorBody(COL_INFOBAR_PLUS_0);
|
||||||
@@ -770,8 +774,11 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
|
|||||||
if(ChannelName.empty())
|
if(ChannelName.empty())
|
||||||
chann_size = 1;
|
chann_size = 1;
|
||||||
chname_width += (chname_width/chann_size/2);
|
chname_width += (chname_width/chann_size/2);
|
||||||
|
|
||||||
|
int tmpY = ((ChanNameY + time_height) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitOffset()
|
||||||
|
+ g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getDigitOffset());
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(
|
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(
|
||||||
ChanNameX + 10 + ChanNumWidth + chname_width, ChanNameY + time_height -SHADOW_OFFSET/2,
|
ChanNameX + 10 + ChanNumWidth + chname_width, tmpY,
|
||||||
BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 - ChanNumWidth - chname_width,
|
BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 - ChanNumWidth - chname_width,
|
||||||
prov_name, color /*COL_INFOBAR_TEXT*/, 0, true); // UTF-8
|
prov_name, color /*COL_INFOBAR_TEXT*/, 0, true); // UTF-8
|
||||||
}
|
}
|
||||||
@@ -1544,17 +1551,17 @@ void CInfoViewer::display_Info(const char *current, const char *next,
|
|||||||
pb_shadow = 0;
|
pb_shadow = 0;
|
||||||
timescale->setShadowOnOff(false);
|
timescale->setShadowOnOff(false);
|
||||||
}
|
}
|
||||||
|
int tmpY = CurrInfoY - height - ChanNameY + time_height -
|
||||||
|
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitOffset()/3;
|
||||||
switch(g_settings.infobar_progressbar) //set progressbar position
|
switch(g_settings.infobar_progressbar) //set progressbar position
|
||||||
{
|
{
|
||||||
case SNeutrinoSettings::INFOBAR_PROGRESSBAR_ARRANGEMENT_BELOW_CH_NAME:
|
case SNeutrinoSettings::INFOBAR_PROGRESSBAR_ARRANGEMENT_BELOW_CH_NAME:
|
||||||
pb_starty = CurrInfoY - ((pb_h * 2) + (pb_h / 6)) ;
|
|
||||||
pb_h = (pb_h/3);
|
pb_h = (pb_h/3);
|
||||||
// pb_color = 0;
|
pb_starty = ChanNameY + (tmpY-pb_h)/2;
|
||||||
break;
|
break;
|
||||||
case SNeutrinoSettings::INFOBAR_PROGRESSBAR_ARRANGEMENT_BELOW_CH_NAME_SMALL:
|
case SNeutrinoSettings::INFOBAR_PROGRESSBAR_ARRANGEMENT_BELOW_CH_NAME_SMALL:
|
||||||
pb_starty = CurrInfoY - ((pb_h * 2) + (pb_h / 5)) ;
|
|
||||||
pb_h = (pb_h/5);
|
pb_h = (pb_h/5);
|
||||||
// pb_color = 0;
|
pb_starty = ChanNameY + (tmpY-pb_h)/2;
|
||||||
break;
|
break;
|
||||||
case SNeutrinoSettings::INFOBAR_PROGRESSBAR_ARRANGEMENT_BETWEEN_EVENTS:
|
case SNeutrinoSettings::INFOBAR_PROGRESSBAR_ARRANGEMENT_BETWEEN_EVENTS:
|
||||||
pb_starty = CurrInfoY + ((pb_h / 3)-(pb_h/5)) ;
|
pb_starty = CurrInfoY + ((pb_h / 3)-(pb_h/5)) ;
|
||||||
|
Reference in New Issue
Block a user