mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
- audioplayer: using CComponentsHeader to paint header
This commit is contained in:
@@ -58,6 +58,7 @@
|
|||||||
#include <gui/nfs.h>
|
#include <gui/nfs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <gui/components/cc_frm.h>
|
||||||
#include <gui/widget/buttons.h>
|
#include <gui/widget/buttons.h>
|
||||||
#include <gui/widget/icons.h>
|
#include <gui/widget/icons.h>
|
||||||
#include <gui/widget/messagebox.h>
|
#include <gui/widget/messagebox.h>
|
||||||
@@ -1644,39 +1645,21 @@ void CAudioPlayerGui::paintHead()
|
|||||||
if (!m_show_playlist || m_screensaver)
|
if (!m_show_playlist || m_screensaver)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int c_rad_mid = RADIUS_MID;
|
CComponentsHeader header(m_x, m_y + m_title_height, m_width, m_theight, LOCALE_AUDIOPLAYER_HEAD, NEUTRINO_ICON_MP3);
|
||||||
std::string strCaption;
|
header.setCornerRadius(RADIUS_MID);
|
||||||
|
|
||||||
if (m_inetmode)
|
if (m_inetmode)
|
||||||
strCaption = g_Locale->getText(LOCALE_INETRADIO_NAME);
|
header.setCaption(LOCALE_INETRADIO_NAME);
|
||||||
else
|
|
||||||
strCaption = g_Locale->getText(LOCALE_AUDIOPLAYER_HEAD);
|
|
||||||
|
|
||||||
m_frameBuffer->paintBoxRel(m_x, m_y + m_title_height, m_width, m_theight, COL_MENUHEAD_PLUS_0, c_rad_mid, CORNER_TOP);
|
if (CNeutrinoApp::getInstance()->isMuted())
|
||||||
|
header.addButtonIcon(NEUTRINO_ICON_BUTTON_MUTE_SMALL);
|
||||||
//m_frameBuffer->paintIcon(NEUTRINO_ICON_MP3,m_x + 7, m_y + m_title_height + 10);
|
|
||||||
int iw, ih;
|
|
||||||
m_frameBuffer->getIconSize(NEUTRINO_ICON_MP3, &iw, &ih);
|
|
||||||
m_frameBuffer->paintIcon(NEUTRINO_ICON_MP3, m_x + 10, m_y + m_title_height, m_theight);
|
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(m_x + 20 + iw, m_y + m_theight + m_title_height + 0,
|
|
||||||
m_width - 20 - iw, strCaption, COL_MENUHEAD, 0, true); // UTF-8
|
|
||||||
int ypos = m_y + m_title_height;
|
|
||||||
//if (m_theight > 26)
|
|
||||||
// ypos = (m_theight - 26) / 2 + m_y + m_title_height;
|
|
||||||
int xpos = m_x + m_width - 10;
|
|
||||||
|
|
||||||
#ifdef ENABLE_GUI_MOUNT
|
#ifdef ENABLE_GUI_MOUNT
|
||||||
if (!m_inetmode) {
|
if (!m_inetmode)
|
||||||
m_frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MENU, &iw, &ih);
|
header.addButtonIcon(NEUTRINO_ICON_BUTTON_MENU);
|
||||||
m_frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MENU, xpos - iw, ypos, m_theight);
|
|
||||||
xpos -= (iw + 10);
|
|
||||||
}
|
|
||||||
//m_frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MENU, m_x + m_width - 30, ypos);
|
|
||||||
#endif
|
#endif
|
||||||
if ( CNeutrinoApp::getInstance()->isMuted() )
|
|
||||||
{
|
header.paint();
|
||||||
m_frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE, &iw, &ih);
|
|
||||||
m_frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MUTE, xpos - iw, ypos, m_theight);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user