mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
- channellist: remove color-mess in progressbar code; don't change colors when moving cursor
This commit is contained in:
@@ -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 ? " ":" - ");
|
||||
|
Reference in New Issue
Block a user