mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
- listframe/moviebrowser: use getItemColors function
This commit is contained in:
@@ -426,27 +426,19 @@ void CListFrame::refreshLine(int line)
|
|||||||
if((line < m_nCurrentLine) && (line > m_nCurrentLine + m_nLinesPerPage))
|
if((line < m_nCurrentLine) && (line > m_nCurrentLine + m_nLinesPerPage))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32_t color, bgcolor;
|
fb_pixel_t color, bgcolor;
|
||||||
int rel_line = line - m_nCurrentLine;
|
int rel_line = line - m_nCurrentLine;
|
||||||
int y = m_cFrameListRel.iY + TEXT_BORDER_WIDTH + (rel_line*m_nFontListHeight);
|
int y = m_cFrameListRel.iY + TEXT_BORDER_WIDTH + (rel_line*m_nFontListHeight);
|
||||||
int radius = 0;
|
int radius = 0;
|
||||||
|
|
||||||
|
bool selected = (line == m_nSelectedLine && m_showSelection == true);
|
||||||
bool marked = (!m_pLines->marked.empty() && m_pLines->marked[line]);
|
bool marked = (!m_pLines->marked.empty() && m_pLines->marked[line]);
|
||||||
if(line == m_nSelectedLine && m_showSelection == true)
|
|
||||||
{
|
getItemColors(color, bgcolor, selected, marked);
|
||||||
color = marked ? COL_MENUCONTENTINACTIVE_TEXT : COL_MENUCONTENTSELECTED_TEXT;
|
|
||||||
bgcolor = marked ? COL_MENUCONTENTSELECTED_PLUS_2 : COL_MENUCONTENTSELECTED_PLUS_0;
|
if (selected || marked)
|
||||||
radius = RADIUS_LARGE;
|
radius = RADIUS_LARGE;
|
||||||
}
|
|
||||||
else if (marked) {
|
|
||||||
color = COL_MENUCONTENT_TEXT;
|
|
||||||
bgcolor = COL_MENUCONTENT_PLUS_2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
color = COL_MENUCONTENT_TEXT;
|
|
||||||
bgcolor = COL_MENUCONTENT_PLUS_0;
|
|
||||||
}
|
|
||||||
frameBuffer->paintBoxRel(m_cFrameListRel.iX+m_cFrame.iX, y+m_cFrame.iY,
|
frameBuffer->paintBoxRel(m_cFrameListRel.iX+m_cFrame.iX, y+m_cFrame.iY,
|
||||||
m_cFrameListRel.iWidth, m_nFontListHeight, bgcolor, radius);
|
m_cFrameListRel.iWidth, m_nFontListHeight, bgcolor, radius);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user