osd fixes

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@668 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 249352e5dc
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-07-15 (Thu, 15 Jul 2010)



------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2010-07-15 11:04:22 +00:00
parent e78814a64e
commit a6dec4625e
6 changed files with 31 additions and 40 deletions

View File

@@ -1680,6 +1680,12 @@ const struct button_label AudioPlayerButtons[][4] =
void CAudioPlayerGui::paintFoot() void CAudioPlayerGui::paintFoot()
{ {
// printf("paintFoot{\n"); // printf("paintFoot{\n");
const struct button_label ScondLineButtons[2] =
{
{ NEUTRINO_ICON_BUTTON_OKAY , LOCALE_AUDIOPLAYER_PLAY },
{ NEUTRINO_ICON_BUTTON_HELP , LOCALE_AUDIOPLAYER_KEYLEVEL },
};
int top; int top;
int c_rad_mid = RADIUS_MID; int c_rad_mid = RADIUS_MID;
if (m_show_playlist) if (m_show_playlist)
@@ -1688,22 +1694,14 @@ void CAudioPlayerGui::paintFoot()
top = m_y + (m_height - 2 * m_buttonHeight); top = m_y + (m_height - 2 * m_buttonHeight);
int ButtonWidth = (m_width - 20) / 4; int ButtonWidth = (m_width - 20) / 4;
int ButtonWidth2 = (m_width - 50) / 2; //int ButtonWidth2 = (m_width - 50) / 2;
m_frameBuffer->paintBoxRel(m_x, top, m_width, 2 * m_buttonHeight, COL_INFOBAR_SHADOW_PLUS_1, c_rad_mid, CORNER_BOTTOM); m_frameBuffer->paintBoxRel(m_x, top, m_width, 2 * m_buttonHeight, COL_INFOBAR_SHADOW_PLUS_1, c_rad_mid, CORNER_BOTTOM);
m_frameBuffer->paintHLine(m_x, m_x + m_width, top, COL_INFOBAR_SHADOW_PLUS_1); m_frameBuffer->paintHLine(m_x, m_x + m_width, top, COL_INFOBAR_SHADOW_PLUS_1);
if (!m_playlist.empty()) if (!m_playlist.empty())
{ {
// play ::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, m_x + 10, top+m_buttonHeight, ButtonWidth, 2, ScondLineButtons);
m_frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, m_x + 1 * ButtonWidth2 + 25, top + m_buttonHeight - 3);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]
->RenderString(m_x + 1 * ButtonWidth2 + 53, top + m_buttonHeight + 24 - 4, ButtonWidth2 - 28,
g_Locale->getText(LOCALE_AUDIOPLAYER_PLAY), COL_INFOBAR /*_SHADOW_PLUS_1*/, 0, true); // UTF-8
// keylevel switch
m_frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HELP, m_x + 0 * ButtonWidth + 25, top + m_buttonHeight - 3);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]
->RenderString(m_x + 0 * ButtonWidth + 53 , top + m_buttonHeight + 24 - 4, ButtonWidth2 - 28,
g_Locale->getText(LOCALE_AUDIOPLAYER_KEYLEVEL), COL_INFOBAR /*_SHADOW_PLUS_1*/, 0, true); // UTF-8
} }
if (m_key_level == 0) if (m_key_level == 0)

View File

@@ -1419,18 +1419,18 @@ void CFileBrowser::paintFoot()
//OK-Button //OK-Button
if( (filelist[selected].getType() != CFile::FILE_UNKNOWN) || (S_ISDIR(filelist[selected].Mode)) ) if( (filelist[selected].getType() != CFile::FILE_UNKNOWN) || (S_ISDIR(filelist[selected].Mode)) )
{ {
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x +3 , by2 - 3); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x +10 , by2 - 3);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + noname, ty2, dx - noname, g_Locale->getText(LOCALE_FILEBROWSER_SELECT), COL_INFOBAR /*_SHADOW_PLUS_1*/, 0, true); // UTF-8 g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + noname, ty2, dx - noname, g_Locale->getText(LOCALE_FILEBROWSER_SELECT), COL_INFOBAR /*_SHADOW_PLUS_1*/, 0, true); // UTF-8
} }
//?-Button //?-Button
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HELP, x + (1 * dx), by2 - 3); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HELP, x + 10 +(1 * dx), by2 - 3);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + noname + (1 * dx), ty2, dx - noname, g_Locale->getText(sortByNames[g_settings.filebrowser_sortmethod]), COL_INFOBAR /*_SHADOW_PLUS_1*/, 0, true); // UTF-8 g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + noname + (1 * dx), ty2, dx - noname, g_Locale->getText(sortByNames[g_settings.filebrowser_sortmethod]), COL_INFOBAR /*_SHADOW_PLUS_1*/, 0, true); // UTF-8
//Mute-Button //Mute-Button
if (strncmp(Path.c_str(), VLC_URI, strlen(VLC_URI)) != 0) { //Not in vlc mode if (strncmp(Path.c_str(), VLC_URI, strlen(VLC_URI)) != 0) { //Not in vlc mode
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MUTE_SMALL, x + (2 * dx), by2 - 3); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MUTE_SMALL, x + 10 + (2 * dx), by2 - 3);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + noname + (2 * dx), ty2, dx - noname, g_Locale->getText(LOCALE_FILEBROWSER_DELETE), COL_INFOBAR /*_SHADOW_PLUS_1*/, 0, true); // UTF-8 g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + noname + (2 * dx), ty2, dx - noname, g_Locale->getText(LOCALE_FILEBROWSER_DELETE), COL_INFOBAR /*_SHADOW_PLUS_1*/, 0, true); // UTF-8
} }

View File

@@ -607,43 +607,38 @@ const struct button_label PictureViewerButtons[4] =
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_AUDIOPLAYER_DELETEALL }, { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_AUDIOPLAYER_DELETEALL },
{ NEUTRINO_ICON_BUTTON_BLUE , LOCALE_PICTUREVIEWER_SLIDESHOW } { NEUTRINO_ICON_BUTTON_BLUE , LOCALE_PICTUREVIEWER_SLIDESHOW }
}; };
const struct button_label PictureViewerButtons2[][2] =
{
{
{ NEUTRINO_ICON_BUTTON_5 , LOCALE_PICTUREVIEWER_SORTORDER_DATE },
{ NEUTRINO_ICON_BUTTON_OKAY , LOCALE_PICTUREVIEWER_SHOW }
},
{
{ NEUTRINO_ICON_BUTTON_5 , LOCALE_PICTUREVIEWER_SORTORDER_FILENAME },
{ NEUTRINO_ICON_BUTTON_OKAY , LOCALE_PICTUREVIEWER_SHOW }
}
};
void CPictureViewerGui::paintFoot() void CPictureViewerGui::paintFoot()
{ {
// printf("paintFoot{\n"); // printf("paintFoot{\n");
int ButtonWidth = (width-20) / 4; int ButtonWidth = (width-20) / 4;
int ButtonWidth2 = (width-50) / 2; // int ButtonWidth2 = (width-50) / 2;
frameBuffer->paintBoxRel(x, y+(height-2*buttonHeight), width, 2*buttonHeight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); frameBuffer->paintBoxRel(x, y+(height-2*buttonHeight), width, 2*buttonHeight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
frameBuffer->paintHLine(x, x+width, y+(height-2*buttonHeight), COL_INFOBAR_SHADOW_PLUS_0); frameBuffer->paintHLine(x, x+width, y+(height-2*buttonHeight), COL_INFOBAR_SHADOW_PLUS_0);
if (!playlist.empty()) if (!playlist.empty())
{ {
//frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x + 1* ButtonWidth2 + 25, y+(height-buttonHeight)-3);
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x + 1* ButtonWidth2 + 25, y+height-buttonHeight, buttonHeight);
//g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + 1 * ButtonWidth2 + 53 , y+(height-buttonHeight)+24 - 4, ButtonWidth2- 28, g_Locale->getText(LOCALE_PICTUREVIEWER_SHOW), COL_INFOBAR, 0, true); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + 1 * ButtonWidth2 + 53 ,
y + height - buttonHeight + sheight + (buttonHeight - sheight)/2, ButtonWidth2- 28,
g_Locale->getText(LOCALE_PICTUREVIEWER_SHOW), COL_INFOBAR, 0, true); // UTF-8
//frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_5, x+ 0* ButtonWidth2 + 25, y+(height-buttonHeight)-3);
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_5, x+ 0* ButtonWidth2 + 25, y+height-buttonHeight, buttonHeight);
std::string tmp = g_Locale->getText(LOCALE_PICTUREVIEWER_SORTORDER);
tmp += ' ';
if (m_sort==FILENAME)
tmp += g_Locale->getText(LOCALE_PICTUREVIEWER_SORTORDER_DATE);
else if (m_sort==DATE)
tmp += g_Locale->getText(LOCALE_PICTUREVIEWER_SORTORDER_FILENAME);
//g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+ 0* ButtonWidth2 +53 , y+(height-buttonHeight)+24 - 4, ButtonWidth2- 28, tmp, COL_INFOBAR, 0, true); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+ 0* ButtonWidth2 +53 ,
y + height - buttonHeight + sheight + (buttonHeight - sheight)/2,
ButtonWidth2- 28, tmp, COL_INFOBAR, 0, true); // UTF-8
//::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + (height - 2 * buttonHeight) + 4, ButtonWidth, 4, PictureViewerButtons); //::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + (height - 2 * buttonHeight) + 4, ButtonWidth, 4, PictureViewerButtons);
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
x + 10, y + (height - 2 * buttonHeight), ButtonWidth, buttonHeight, x + 10, y + (height - 2 * buttonHeight), ButtonWidth, buttonHeight,
4, PictureViewerButtons); 4, PictureViewerButtons);
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
x + 10, y + (height - buttonHeight), ButtonWidth*2, buttonHeight,
2, (m_sort==FILENAME)?PictureViewerButtons2[0]:PictureViewerButtons2[1]);
} }
else else
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,

View File

@@ -36,7 +36,7 @@ void paintButtons(CFrameBuffer * const frameBuffer, Font * const font, const CLo
frameBuffer->getIconSize(content[i].button, &iw, &ih); frameBuffer->getIconSize(content[i].button, &iw, &ih);
frameBuffer->paintIcon(content[i].button, x + i * buttonwidth, y); frameBuffer->paintIcon(content[i].button, x + i * buttonwidth, y);
font->RenderString(x + i * buttonwidth + 20, y + fh-(fh-ih)/2, buttonwidth - 20, localemanager->getText(content[i].locale), COL_INFOBAR, 0, true); // UTF-8 font->RenderString(x + i * buttonwidth + iw + 5, y + fh-(fh-ih)/2, buttonwidth - iw - 5, localemanager->getText(content[i].locale), COL_INFOBAR, 0, true); // UTF-8
} }
} }
#endif #endif

View File

@@ -875,7 +875,6 @@ typedef enum {
LOCALE_PICTUREVIEWER_SHOW, LOCALE_PICTUREVIEWER_SHOW,
LOCALE_PICTUREVIEWER_SLIDE_TIME, LOCALE_PICTUREVIEWER_SLIDE_TIME,
LOCALE_PICTUREVIEWER_SLIDESHOW, LOCALE_PICTUREVIEWER_SLIDESHOW,
LOCALE_PICTUREVIEWER_SORTORDER,
LOCALE_PICTUREVIEWER_SORTORDER_DATE, LOCALE_PICTUREVIEWER_SORTORDER_DATE,
LOCALE_PICTUREVIEWER_SORTORDER_FILENAME, LOCALE_PICTUREVIEWER_SORTORDER_FILENAME,
LOCALE_PING_OK, LOCALE_PING_OK,

View File

@@ -875,7 +875,6 @@ const char *locale_real_names[] = {
"pictureviewer.show", "pictureviewer.show",
"pictureviewer.slide_time", "pictureviewer.slide_time",
"pictureviewer.slideshow", "pictureviewer.slideshow",
"pictureviewer.sortorder",
"pictureviewer.sortorder.date", "pictureviewer.sortorder.date",
"pictureviewer.sortorder.filename", "pictureviewer.sortorder.filename",
"ping.ok", "ping.ok",