mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
Merge branch 'master' into pu/mp
This commit is contained in:
@@ -298,8 +298,8 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
m_info_height = 2*OFFSET_INNER_SMALL + 2*g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight();
|
||||
m_button_height = ::paintButtons(AudioPlayerButtons[0], 4, 0, 0, 0, 0, 0, false, NULL, NULL);
|
||||
|
||||
m_listmaxshow = (m_height - m_title_height - OFFSET_INTER - m_header_height - 2*m_button_height - OFFSET_INTER - m_info_height) / (m_item_height);
|
||||
m_height = m_title_height + OFFSET_INTER + m_header_height + m_listmaxshow*m_item_height + 2*m_button_height + OFFSET_INTER + m_info_height; // recalc height
|
||||
m_listmaxshow = (m_height - m_title_height - OFFSET_SHADOW - OFFSET_INTER - m_header_height - 2*m_button_height - OFFSET_SHADOW - OFFSET_INTER - m_info_height - OFFSET_SHADOW) / (m_item_height);
|
||||
m_height = m_title_height + OFFSET_SHADOW + OFFSET_INTER + m_header_height + m_listmaxshow*m_item_height + 2*m_button_height + OFFSET_SHADOW + OFFSET_INTER + m_info_height + OFFSET_SHADOW; // recalc height
|
||||
|
||||
m_x = getScreenStartX(m_width);
|
||||
if (m_x < DETAILSLINE_WIDTH)
|
||||
@@ -1538,7 +1538,7 @@ void CAudioPlayerGui::hide()
|
||||
if (m_visible)
|
||||
{
|
||||
clearDetailsLine();
|
||||
m_frameBuffer->paintBackgroundBoxRel(m_x, m_y, m_width, m_height);
|
||||
m_frameBuffer->paintBackgroundBoxRel(m_x, m_y, m_width + OFFSET_SHADOW, m_height + OFFSET_SHADOW);
|
||||
m_visible = false;
|
||||
}
|
||||
}
|
||||
@@ -1548,7 +1548,7 @@ void CAudioPlayerGui::paintItem(int pos)
|
||||
if (!m_show_playlist)
|
||||
return;
|
||||
|
||||
int ypos = m_y + m_title_height + OFFSET_INTER + m_header_height + pos*m_item_height;
|
||||
int ypos = m_y + m_title_height + OFFSET_SHADOW + OFFSET_INTER + m_header_height + pos*m_item_height;
|
||||
unsigned int currpos = m_liststart + pos;
|
||||
|
||||
bool i_selected = currpos == m_selected;
|
||||
@@ -1578,9 +1578,12 @@ void CAudioPlayerGui::paintItem(int pos)
|
||||
std::string tmp = sNr;
|
||||
getFileInfoToDisplay(tmp, m_playlist[currpos]);
|
||||
|
||||
char dura[9];
|
||||
char dura[9] = {0};
|
||||
if (m_inetmode)
|
||||
snprintf(dura, 8, "%ldk", m_playlist[currpos].MetaData.total_time);
|
||||
{
|
||||
if (m_playlist[currpos].MetaData.total_time != 0)
|
||||
snprintf(dura, 8, "%ldk", m_playlist[currpos].MetaData.total_time);
|
||||
}
|
||||
else
|
||||
snprintf(dura, 8, "%ld:%02ld", m_playlist[currpos].MetaData.total_time / 60, m_playlist[currpos].MetaData.total_time % 60);
|
||||
|
||||
@@ -1600,7 +1603,8 @@ void CAudioPlayerGui::paintHead()
|
||||
if (!m_show_playlist || m_screensaver)
|
||||
return;
|
||||
|
||||
CComponentsHeaderLocalized header(m_x, m_y + m_title_height + OFFSET_INTER, m_width, m_header_height, LOCALE_AUDIOPLAYER_HEAD, NEUTRINO_ICON_AUDIO);
|
||||
CComponentsHeaderLocalized header(m_x, m_y + m_title_height + OFFSET_SHADOW + OFFSET_INTER, m_width, m_header_height, LOCALE_AUDIOPLAYER_HEAD, NEUTRINO_ICON_AUDIO);
|
||||
header.enableShadow( CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT, -1, true);
|
||||
header.setCorner(RADIUS_MID, CORNER_TOP);
|
||||
|
||||
if (m_inetmode)
|
||||
@@ -1626,7 +1630,10 @@ void CAudioPlayerGui::paintFoot()
|
||||
{ NEUTRINO_ICON_BUTTON_INFO, LOCALE_PICTUREVIEWER_HEAD }
|
||||
};
|
||||
|
||||
int button_y = m_y + m_height - m_info_height - OFFSET_INTER - 2*m_button_height;
|
||||
int button_y = m_y + m_height - OFFSET_SHADOW - m_info_height - OFFSET_INTER - OFFSET_SHADOW - 2*m_button_height;
|
||||
|
||||
// shadow
|
||||
m_frameBuffer->paintBoxRel(m_x + OFFSET_SHADOW, button_y + OFFSET_SHADOW, m_width, 2*m_button_height, COL_SHADOW_PLUS_0, RADIUS_MID, (m_show_playlist ? CORNER_BOTTOM : CORNER_ALL));
|
||||
|
||||
m_frameBuffer->paintBoxRel(m_x, button_y, m_width, 2*m_button_height, COL_MENUFOOT_PLUS_0, RADIUS_MID, (m_show_playlist ? CORNER_BOTTOM : CORNER_ALL));
|
||||
|
||||
@@ -1694,6 +1701,9 @@ void CAudioPlayerGui::paintTitleBox()
|
||||
m_frameBuffer->paintBackgroundBoxRel(m_x, m_y, m_width, m_title_height);
|
||||
else
|
||||
{
|
||||
// shadow
|
||||
m_frameBuffer->paintBoxRel(m_x + OFFSET_SHADOW, m_y + OFFSET_SHADOW, m_width, m_title_height, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
|
||||
m_frameBuffer->paintBoxRel(m_x, m_y, m_width, m_title_height, COL_MENUHEAD_PLUS_0, RADIUS_MID);
|
||||
m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, m_title_height, OFFSET_INNER_MIN, COL_FRAME_PLUS_0, RADIUS_MID);
|
||||
|
||||
@@ -1731,13 +1741,13 @@ void CAudioPlayerGui::paintTitleBox()
|
||||
else if (g_settings.audioplayer_display == TITLE_ARTIST)
|
||||
{
|
||||
tmp = m_curr_audiofile.MetaData.title;
|
||||
tmp += " / ";
|
||||
tmp += " - ";
|
||||
tmp += m_curr_audiofile.MetaData.artist;
|
||||
}
|
||||
else //if (g_settings.audioplayer_display == ARTIST_TITLE)
|
||||
{
|
||||
tmp = m_curr_audiofile.MetaData.artist;
|
||||
tmp += " / ";
|
||||
tmp += " - ";
|
||||
tmp += m_curr_audiofile.MetaData.title;
|
||||
}
|
||||
w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp);
|
||||
@@ -1768,12 +1778,12 @@ void CAudioPlayerGui::paint()
|
||||
for (unsigned int count=0; count<m_listmaxshow; count++)
|
||||
paintItem(count);
|
||||
|
||||
//scrollbar
|
||||
// scrollbar
|
||||
int total_pages;
|
||||
int current_page;
|
||||
getScrollBarData(&total_pages, ¤t_page, m_playlist.size(), m_listmaxshow, m_selected);
|
||||
|
||||
paintScrollBar(m_x + m_width - SCROLLBAR_WIDTH, m_y + m_title_height + OFFSET_INTER + m_header_height, SCROLLBAR_WIDTH, m_item_height*m_listmaxshow, total_pages, current_page);
|
||||
paintScrollBar(m_x + m_width - SCROLLBAR_WIDTH, m_y + m_title_height + OFFSET_SHADOW + OFFSET_INTER + m_header_height, SCROLLBAR_WIDTH, m_item_height*m_listmaxshow, total_pages, current_page, CC_SHADOW_ON);
|
||||
}
|
||||
|
||||
paintTitleBox();
|
||||
@@ -1789,8 +1799,8 @@ void CAudioPlayerGui::clearDetailsLine()
|
||||
void CAudioPlayerGui::paintDetailsLine(int pos)
|
||||
{
|
||||
int xpos = m_x - DETAILSLINE_WIDTH;
|
||||
int ypos1 = m_y + m_title_height + OFFSET_INTER + m_header_height + pos*m_item_height;
|
||||
int ypos2 = m_y + (m_height - m_info_height);
|
||||
int ypos1 = m_y + m_title_height + OFFSET_SHADOW + OFFSET_INTER + m_header_height + pos*m_item_height;
|
||||
int ypos2 = m_y + (m_height - OFFSET_SHADOW - m_info_height);
|
||||
int ypos1a = ypos1 + (m_item_height / 2);
|
||||
int ypos2a = ypos2 + (m_info_height / 2);
|
||||
|
||||
@@ -1817,6 +1827,7 @@ void CAudioPlayerGui::paintDetailsLine(int pos)
|
||||
m_infobox->setCorner(RADIUS_LARGE);
|
||||
m_infobox->setColorFrame(COL_FRAME_PLUS_0);
|
||||
m_infobox->setColorBody(COL_MENUCONTENTDARK_PLUS_0);
|
||||
m_infobox->enableShadow(CC_SHADOW_ON, -1, true);
|
||||
m_infobox->forceTextPaint(false);
|
||||
}
|
||||
|
||||
@@ -2071,7 +2082,7 @@ void CAudioPlayerGui::updateMetaData()
|
||||
paintCover();
|
||||
}
|
||||
if (CAudioPlayer::getInstance()->hasMetaDataChanged() != 0)
|
||||
updateLcd = true;
|
||||
updateLcd = true;
|
||||
|
||||
//printf("CAudioPlayerGui::updateMetaData: updateLcd %d\n", updateLcd);
|
||||
if (updateLcd)
|
||||
|
Reference in New Issue
Block a user