src/gui/channellist.cpp: skip paint BG for item if firstpaint

This commit is contained in:
Jacek Jendrzej
2013-05-03 18:42:35 +02:00
parent 05df699bc8
commit 4bf2a4aa19
2 changed files with 9 additions and 6 deletions

View File

@@ -1815,7 +1815,7 @@ void CChannelList::paintButtonBar(bool is_current)
::paintButtons(x, y_foot, full_width, bcnt, Button, full_width, footerHeight); ::paintButtons(x, y_foot, full_width, bcnt, Button, full_width, footerHeight);
} }
void CChannelList::paintItem(int pos) void CChannelList::paintItem(int pos, const bool firstpaint)
{ {
int ypos = y+ theight + pos*fheight; int ypos = y+ theight + pos*fheight;
uint8_t color; uint8_t color;
@@ -1824,7 +1824,7 @@ void CChannelList::paintItem(int pos)
bool paintbuttons = false; bool paintbuttons = false;
unsigned int curr = liststart + pos; unsigned int curr = liststart + pos;
int rec_mode; int rec_mode;
fb_pixel_t c_rad_small = 0;
#if 0 #if 0
if(CNeutrinoApp::getInstance()->recordingstatus && !autoshift && curr < chanlist.size()) { if(CNeutrinoApp::getInstance()->recordingstatus && !autoshift && curr < chanlist.size()) {
iscurrent = (chanlist[curr]->channel_id >> 16) == (rec_channel_id >> 16); iscurrent = (chanlist[curr]->channel_id >> 16) == (rec_channel_id >> 16);
@@ -1839,12 +1839,15 @@ void CChannelList::paintItem(int pos)
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
paintItem2DetailsLine (pos); paintItem2DetailsLine (pos);
paintDetails(curr); paintDetails(curr);
frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, RADIUS_LARGE); c_rad_small = RADIUS_LARGE;
paintbuttons = true; paintbuttons = true;
} else { } else {
color = iscurrent ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE; color = iscurrent ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE;
bgcolor = iscurrent ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0; bgcolor = iscurrent ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0;
frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, 0); }
if(!firstpaint || (curr == selected)){
frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, c_rad_small);
} }
if(curr < chanlist.size()) { if(curr < chanlist.size()) {
@@ -2102,7 +2105,7 @@ void CChannelList::paint()
frameBuffer->paintBoxRel(x+width,y+theight,infozone_width,pig_height+infozone_height,COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x+width,y+theight,infozone_width,pig_height+infozone_height,COL_MENUCONTENT_PLUS_0);
for(unsigned int count = 0; count < listmaxshow; count++) { for(unsigned int count = 0; count < listmaxshow; count++) {
paintItem(count); paintItem(count, true);
} }
const int ypos = y+ theight; const int ypos = y+ theight;
const int sb = height - theight - footerHeight; // paint scrollbar over full height of main box const int sb = height - theight - footerHeight; // paint scrollbar over full height of main box

View File

@@ -103,7 +103,7 @@ private:
void paintDetails(int index); void paintDetails(int index);
void clearItem2DetailsLine (); void clearItem2DetailsLine ();
void paintItem2DetailsLine (int pos); void paintItem2DetailsLine (int pos);
void paintItem(int pos); void paintItem(int pos,const bool firstpaint = false);
bool updateSelection(int newpos); bool updateSelection(int newpos);
void paint(); void paint();
void paintHead(); void paintHead();