mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
- moviebrowser: use ccomponents to paint header
This commit is contained in:
@@ -1619,7 +1619,6 @@ void CMovieBrowser::refreshBookmarkList(void) // P3
|
|||||||
|
|
||||||
void CMovieBrowser::refreshTitle(void)
|
void CMovieBrowser::refreshTitle(void)
|
||||||
{
|
{
|
||||||
//Paint Text Background
|
|
||||||
std::string title = m_textTitle.c_str();
|
std::string title = m_textTitle.c_str();
|
||||||
if (show_mode == MB_SHOW_YT) {
|
if (show_mode == MB_SHOW_YT) {
|
||||||
title = g_Locale->getText(LOCALE_MOVIEPLAYER_YTPLAYBACK);
|
title = g_Locale->getText(LOCALE_MOVIEPLAYER_YTPLAYBACK);
|
||||||
@@ -1629,17 +1628,14 @@ void CMovieBrowser::refreshTitle(void)
|
|||||||
|
|
||||||
TRACE("[mb]->refreshTitle : %s\r\n", title.c_str());
|
TRACE("[mb]->refreshTitle : %s\r\n", title.c_str());
|
||||||
|
|
||||||
const short text_border_width = 8;
|
int x = m_cBoxFrameTitleRel.iX + m_cBoxFrame.iX;
|
||||||
int start_y = m_cBoxFrame.iY+ m_cBoxFrameTitleRel.iY;
|
int y = m_cBoxFrameTitleRel.iY + m_cBoxFrame.iY;
|
||||||
|
int w = m_cBoxFrameTitleRel.iWidth;
|
||||||
|
int h = m_cBoxFrameTitleRel.iHeight;
|
||||||
|
|
||||||
m_pcWindow->paintBoxRel(m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX, start_y,
|
CComponentsHeader header(x, y, w, h, title.c_str(), NEUTRINO_ICON_MOVIEPLAYER);
|
||||||
m_cBoxFrameTitleRel.iWidth, m_cBoxFrameTitleRel.iHeight, TITLE_BACKGROUND_COLOR, RADIUS_LARGE, CORNER_TOP);
|
header.paint(CC_SAVE_SCREEN_NO);
|
||||||
|
|
||||||
int iconw = 0, iconh = 0;
|
|
||||||
CFrameBuffer::getInstance()->getIconSize(NEUTRINO_ICON_MOVIEPLAYER, &iconw, &iconh);
|
|
||||||
m_pcWindow->paintIcon(NEUTRINO_ICON_MOVIEPLAYER, m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX+6, start_y+ m_cBoxFrameTitleRel.iHeight/2 - iconh/2);
|
|
||||||
|
|
||||||
m_pcFontTitle->RenderString(m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX + iconw + text_border_width, start_y + m_cBoxFrameTitleRel.iHeight, m_cBoxFrameTitleRel.iWidth - (text_border_width << 1), title.c_str(), TITLE_FONT_COLOR, 0, true); // UTF-8
|
|
||||||
info_hdd_level(true);
|
info_hdd_level(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user