change shadow color for blink ProgressBar

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@170 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
satbaby
2010-01-16 16:55:28 +00:00
parent 2c215c8f55
commit 465f97d4d5

View File

@@ -289,7 +289,7 @@ void CInfoViewer::showRecordIcon (const bool show)
ChanNameX = BoxStartX + ChanWidth + 20;
if (show) {
frameBuffer->paintIcon (autoshift ? "ats.raw" : NEUTRINO_ICON_BUTTON_RED, ChanNameX, BoxStartY + 12);
if(!autoshift && !shift_timer) {
if (!autoshift && !shift_timer) {
int chanH = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight ();
frameBuffer->paintBoxRel (ChanNameX + 28 + SHADOW_OFFSET, BoxStartY + 12 + SHADOW_OFFSET, 300, 20, COL_INFOBAR_SHADOW_PLUS_0);
frameBuffer->paintBoxRel (ChanNameX + 28, BoxStartY + 12, 300, 20, COL_INFOBAR_PLUS_0);
@@ -363,7 +363,11 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
fileplay = (ChanNum == 0);
newfreq = true;
sigscale->reset(); snrscale->reset(); timescale->reset(); hddscale->reset(); varscale->reset();
sigscale->reset();
snrscale->reset();
timescale->reset();
hddscale->reset();
varscale->reset();
lastsig = lastsnr = lasthdd = lastvar = -1;
#if 0
InfoHeightY = NUMBER_H * 9 / 8 + 2 * g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight () + 25;
@@ -445,7 +449,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
if (g_settings.infobar_sat_display && satellitePosition != 0 && satellitePositions.size()) {
sat_iterator_t sit = satellitePositions.find(satellitePosition);
if(sit != satellitePositions.end()) {
if (sit != satellitePositions.end()) {
int satNameWidth = g_SignalFont->getRenderWidth (sit->second.name);
if (satNameWidth > (ChanWidth - 4))
satNameWidth = ChanWidth - 4;
@@ -464,7 +468,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
int ChanNumWidth = 0;
bool logo_ok = false;
if(showButtonBar) {
if (showButtonBar) {
#define PIC_W 52
#define PIC_H 39
#define PIC_X (ChanNameX + 10)
@@ -492,8 +496,8 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
frameBuffer->paintBox(ChanInfoX, BoxEndY, BoxEndX, BoxEndY + bottom_bar_offset, COL_BLACK);
int xcnt = (BoxEndX - ChanInfoX) / 4;
int ycnt = bottom_bar_offset / 4;
for(int i = 0; i < xcnt; i++) {
for(int j = 0; j < ycnt; j++)
for (int i = 0; i < xcnt; i++) {
for (int j = 0; j < ycnt; j++)
/* BoxEndY + 2 is the magic number that also appears in paint_ca_icons */
frameBuffer->paintBoxRel(ChanInfoX + i*4, BoxEndY + 2 + j*4, 2, 2, COL_INFOBAR_PLUS_1);
}
@@ -812,7 +816,7 @@ void CInfoViewer::showSubchan ()
void CInfoViewer::showIcon_16_9 ()
{
if((aspectRatio == 0) || (aspectRatio != videoDecoder->getAspectRatio())) {
if ((aspectRatio == 0) || (aspectRatio != videoDecoder->getAspectRatio())) {
aspectRatio = videoDecoder->getAspectRatio();
frameBuffer->paintIcon((aspectRatio > 2) ? "16_9.raw" : "16_9_gray.raw",
BoxEndX - (2*ICON_LARGE_WIDTH + 2*ICON_SMALL_WIDTH + 4*2), BBarY,
@@ -833,7 +837,7 @@ void CInfoViewer::showIcon_SubT() const
{
bool have_sub = false;
CZapitChannel * cc = CNeutrinoApp::getInstance()->channelList->getChannel(CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber());
if(cc && cc->getSubtitleCount())
if (cc && cc->getSubtitleCount())
have_sub = true;
frameBuffer->paintIcon(have_sub ? "subt.raw" : "subt_gray.raw", BoxEndX - (ICON_SMALL_WIDTH + 2),
@@ -890,7 +894,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
}
} else if (msg == NeutrinoMessages::EVT_RECORDMODE) {
recordModeActive = data;
if(is_visible) showRecordIcon(true);
if (is_visible) showRecordIcon(true);
} else if (msg == NeutrinoMessages::EVT_ZAP_GOTAPIDS) {
if ((*(t_channel_id *) data) == channel_id) {
if (is_visible && showButtonBar)
@@ -1099,7 +1103,7 @@ void CInfoViewer::showSNR ()
per = 0;
//HD info
if (::statfs(g_settings.network_nfs_recordingdir, &s) == 0) {
switch(s.f_type)
switch (s.f_type)
{
case (int) 0xEF53: /*EXT2 & EXT3*/
case (int) 0x6969: /*NFS*/
@@ -1162,7 +1166,7 @@ void CInfoViewer::display_Info(const char *current, const char *next,
if (pb_p > pb_w)
pb_p = pb_w;
timescale->paintProgressBar(BoxEndX - pb_w - SHADOW_OFFSET, BoxStartY + 12, pb_w, pb_h, pb_p, pb_w,
0, 0, COL_INFOBAR_PLUS_0, COL_INFOBAR_SHADOW_PLUS_0, "", COL_INFOBAR);
0, 0, pb_blink ? COL_INFOBAR_SHADOW_PLUS_0 : COL_INFOBAR_PLUS_0, COL_INFOBAR_SHADOW_PLUS_0, "", COL_INFOBAR);
}
int currTimeW = 0;
@@ -1222,10 +1226,10 @@ void CInfoViewer::show_Data (bool calledFromEvent)
if (fileplay) {
int posy = BoxStartY + 12;
runningPercent = file_prozent;
if(runningPercent > 100)
if (runningPercent > 100)
runningPercent = 100;
if(!calledFromEvent || (oldrunningPercent != runningPercent)) {
if (!calledFromEvent || (oldrunningPercent != runningPercent)) {
frameBuffer->paintBoxRel (b114+4, posy, 102, 18, COL_INFOBAR_SHADOW_PLUS_0);
frameBuffer->paintBoxRel (b112+4, posy + 2, 98, 14, COL_INFOBAR_PLUS_0);
oldrunningPercent = file_prozent;
@@ -1269,7 +1273,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
sprintf (runningRest, "in %d min", -seit);
} else {
runningPercent = (unsigned) ((float) (jetzt - info_CurrentNext.current_zeit.startzeit) / (float) info_CurrentNext.current_zeit.dauer * 100.);
if(runningPercent > 100)
if (runningPercent > 100)
runningPercent = 100;
sprintf (runningRest, "%d / %d min", seit, rest);
}
@@ -1296,7 +1300,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
//percent
if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) {
//printf("CInfoViewer::show_Data: ************************************************* runningPercent %d\n", runningPercent);
if(!calledFromEvent || (oldrunningPercent != runningPercent)) {
if (!calledFromEvent || (oldrunningPercent != runningPercent)) {
frameBuffer->paintBoxRel(BoxEndX - 104, posy + 6, 108, 14, COL_INFOBAR_SHADOW_PLUS_0, 1);
frameBuffer->paintBoxRel(BoxEndX - 108, posy + 2, 108, 14, COL_INFOBAR_PLUS_0, 1);
oldrunningPercent = runningPercent;
@@ -1399,7 +1403,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
//info next
//frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);
if(last_next_id != info_CurrentNext.next_uniqueKey) {
if (last_next_id != info_CurrentNext.next_uniqueKey) {
frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, nextStart, COL_INFOBAR);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration2TextPos - xStart - 5, info_CurrentNext.next_name, COL_INFOBAR, 0, true);
@@ -1407,7 +1411,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
last_next_id = info_CurrentNext.next_uniqueKey;
}
} else {
if(last_curr_id != info_CurrentNext.current_uniqueKey) {
if (last_curr_id != info_CurrentNext.current_uniqueKey) {
frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, runningStart, COL_INFOBAR);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration1TextPos - xStart - 5, info_CurrentNext.current_name, COL_INFOBAR, 0, true);
@@ -1423,7 +1427,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
//frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);
if ((!is_nvod) && (info_CurrentNext.flags & CSectionsdClient::epgflags::has_next)) {
if(last_next_id != info_CurrentNext.next_uniqueKey) {
if (last_next_id != info_CurrentNext.next_uniqueKey) {
frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, nextStart, COL_INFOBAR);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration2TextPos - xStart - 5, info_CurrentNext.next_name, COL_INFOBAR, 0, true);
@@ -1434,7 +1438,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
//frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);//why this...
}
}
}
}
#endif
}
@@ -1551,52 +1555,62 @@ void CInfoViewer::paint_ca_icons(int caid, char * icon)
switch ( caid & 0xFF00 ) {
case 0x0E00:
px = endx - 48 - 38 - 9*10 - 7*14 - 10; sprintf(buf, "%s_%s.raw", "powervu", icon);
px = endx - 48 - 38 - 9*10 - 7*14 - 10;
sprintf(buf, "%s_%s.raw", "powervu", icon);
break;
case 0x4A00:
px = endx - 48 - 38 - 8*10 - 6*14 - 10; sprintf(buf, "%s_%s.raw", "d", icon);
px = endx - 48 - 38 - 8*10 - 6*14 - 10;
sprintf(buf, "%s_%s.raw", "d", icon);
break;
case 0x2600:
px = endx - 48 - 38 - 7*10 - 5*14 - 10; sprintf(buf, "%s_%s.raw", "biss", icon);
px = endx - 48 - 38 - 7*10 - 5*14 - 10;
sprintf(buf, "%s_%s.raw", "biss", icon);
break;
case 0x600:
case 0x602:
case 0x1700:
px = endx - 48 - 38 - 6*10 - 4*14 - 10; sprintf(buf, "%s_%s.raw", "ird", icon);
px = endx - 48 - 38 - 6*10 - 4*14 - 10;
sprintf(buf, "%s_%s.raw", "ird", icon);
break;
case 0x100:
px = endx - 48 - 38 - 5*10 - 4*14; sprintf(buf, "%s_%s.raw", "seca", icon);
px = endx - 48 - 38 - 5*10 - 4*14;
sprintf(buf, "%s_%s.raw", "seca", icon);
break;
case 0x500:
px = endx - 48 - 38 - 4*10 - 3*14; sprintf(buf, "%s_%s.raw", "via", icon);
px = endx - 48 - 38 - 4*10 - 3*14;
sprintf(buf, "%s_%s.raw", "via", icon);
break;
case 0x1800:
case 0x1801:
px = endx - 48 - 38 - 3*10 - 2*14; sprintf(buf, "%s_%s.raw", "nagra", icon);
px = endx - 48 - 38 - 3*10 - 2*14;
sprintf(buf, "%s_%s.raw", "nagra", icon);
break;
case 0xB00:
px = endx - 48 - 38 - 2*10 - 1*14; sprintf(buf, "%s_%s.raw", "conax", icon);
px = endx - 48 - 38 - 2*10 - 1*14;
sprintf(buf, "%s_%s.raw", "conax", icon);
break;
case 0xD00:
px = endx - 48 - 38 - 1*10; sprintf(buf, "%s_%s.raw", "cw", icon);
px = endx - 48 - 38 - 1*10;
sprintf(buf, "%s_%s.raw", "cw", icon);
break;
case 0x900:
px = endx - 48; sprintf(buf, "%s_%s.raw", "nds", icon);
px = endx - 48;
sprintf(buf, "%s_%s.raw", "nds", icon);
break;
default:
break;
}/*case*/
if(px) {
if (px) {
frameBuffer->paintIcon(buf, px, py );
}
}
static char * gray = (char *) "white";
//static char * green = (char *) "green";
static char * white = (char *) "yellow";
extern int pmt_caids[10];
static char * white = (char *) "yellow";
extern int pmt_caids[10];
void CInfoViewer::showIcon_CA_Status (int notfirst)
void CInfoViewer::showIcon_CA_Status (int notfirst)
{
#if 0
FILE *f;
@@ -1608,8 +1622,8 @@ void CInfoViewer::showIcon_CA_Status (int notfirst)
int i;
int caids[] = { 0x1700, 0x0100, 0x0500, 0x1800, 0xB00, 0xD00, 0x900, 0x2600, 0x4a00, 0x0E00 };
if(!notfirst) {
for(i=0; i < (int)(sizeof(caids)/sizeof(int)); i++) {
if (!notfirst) {
for (i=0; i < (int)(sizeof(caids)/sizeof(int)); i++) {
paint_ca_icons(caids[i], (char *) (pmt_caids[i] ? white : gray));
}
}