From 789280736d7a504bbb7721f3c0ff9ff7dab57180 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 5 Nov 2013 10:09:08 +0100 Subject: [PATCH] - moviebrowser: use ccomponents to paint header --- src/gui/moviebrowser.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 1eb47dbee..ea6d891f8 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -1619,7 +1619,6 @@ void CMovieBrowser::refreshBookmarkList(void) // P3 void CMovieBrowser::refreshTitle(void) { - //Paint Text Background std::string title = m_textTitle.c_str(); if (show_mode == MB_SHOW_YT) { title = g_Locale->getText(LOCALE_MOVIEPLAYER_YTPLAYBACK); @@ -1629,17 +1628,14 @@ void CMovieBrowser::refreshTitle(void) TRACE("[mb]->refreshTitle : %s\r\n", title.c_str()); - const short text_border_width = 8; - int start_y = m_cBoxFrame.iY+ m_cBoxFrameTitleRel.iY; + int x = m_cBoxFrameTitleRel.iX + m_cBoxFrame.iX; + 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, - m_cBoxFrameTitleRel.iWidth, m_cBoxFrameTitleRel.iHeight, TITLE_BACKGROUND_COLOR, RADIUS_LARGE, CORNER_TOP); - - 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); + CComponentsHeader header(x, y, w, h, title.c_str(), NEUTRINO_ICON_MOVIEPLAYER); + header.paint(CC_SAVE_SCREEN_NO); - 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); }