channellist: remove color-mess in progressbar code; don't change colors when moving cursor

Origin commit data
------------------
Branch: ni/coolstream
Commit: abd3f97e9d
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-10 (Mon, 10 Oct 2016)

Origin message was:
------------------
- channellist: remove color-mess in progressbar code; don't change colors when moving cursor

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-10-10 14:19:54 +02:00
parent 093234e5f1
commit b30174a112

View File

@@ -1983,32 +1983,15 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
l = snprintf(nameAndDescription, sizeof(nameAndDescription), "%s", chan->getName().c_str());
int pb_space = prg_offset - title_offset;
CProgressBar pb(x+5+numwidth + title_offset, ypos + fheight/4 + 2, pb_space + 2, fheight/2 - 4,
0, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0, COL_INFOBAR_PLUS_7, COL_INFOBAR_PLUS_3);
int pb_height = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getDigitHeight();
CProgressBar pb(x+5+numwidth + title_offset, ypos + (fheight-pb_height)/2, pb_space + 2, pb_height, COL_MENUCONTENT_PLUS_0);
pb.setType(CProgressBar::PB_TIMESCALE);
pb.setDesign(g_settings.channellist_progressbar_design);
pb.setCornerType(0);
pb.setFrameThickness(0); // no frame
pb.doPaintBg(false); // no background
pb.setStatusColors(COL_MENUCONTENT_PLUS_3, COL_MENUCONTENT_PLUS_1);
pb.setFrameThickness(g_settings.channellist_progressbar_design == CProgressBar::PB_MONO ? 1 : 0);
pb.doPaintBg(false);
int pb_max = pb_space - 4;
if (g_settings.progressbar_design != CProgressBar::PB_MONO) {
if (liststart + pos != selected) {
fb_pixel_t pbgcol = COL_MENUCONTENT_PLUS_1;
if (pbgcol == bgcolor)
pbgcol = COL_MENUCONTENT_PLUS_0;
pb.setStatusColors(COL_MENUCONTENT_PLUS_3, pbgcol);
} else {
fb_pixel_t pbgcol = COL_MENUCONTENTSELECTED_PLUS_0;
if (pbgcol == bgcolor)
pbgcol = COL_MENUCONTENT_PLUS_0;
pb.setStatusColors(COL_MENUCONTENTSELECTED_PLUS_2, pbgcol);
}
} else {
if (liststart + pos != selected)
pb.setStatusColors(COL_MENUCONTENT_PLUS_3, COL_MENUCONTENT_PLUS_1);
else
pb.setStatusColors(COL_MENUCONTENTSELECTED_PLUS_2, COL_MENUCONTENTSELECTED_PLUS_0);
}
if (!(p_event->description.empty())) {
snprintf(nameAndDescription+l, sizeof(nameAndDescription)-l,g_settings.channellist_epgtext_align_right ? " ":" - ");