*neutrino buttonbars: reworked painting of buttonbar in

channellist,
stringinput (also cleared some char format problems),
audioplayer,
bouqueteditor_bouqets,
bouqueteditor_channels,
bouqueteditor_chanselect,
bookmarkmanager,,
bouquetlist,
filebrowser,
epgplus,
epgview,
pictureviewer,
timerlist,
upnpbrowser

TODO:
This is still not a final solution. I would like to see buttonhandling in
own class for better integration and handling of window structure.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1179 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
thilo
2011-02-21 09:08:10 +00:00
parent dbc92abfb9
commit e1f887af72
20 changed files with 317 additions and 269 deletions

View File

@@ -1703,71 +1703,51 @@ const struct button_label ScondLineButtons[2] =
else
top = m_y + (m_height - 2 * m_buttonHeight);
int ButtonWidth = (m_width - 20) / 4;
int ButtonWidth = (m_width - 20) / 5;
//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->paintHLine(m_x, m_x + m_width, top, COL_INFOBAR_SHADOW_PLUS_1);
if (!m_playlist.empty())
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, m_x + 10, top+m_buttonHeight, ButtonWidth, 2, ScondLineButtons);
::paintButtons(m_x, top+m_buttonHeight, m_width, 2, ScondLineButtons, m_buttonHeight, ButtonWidth);
}
if (m_key_level == 0)
{
if (m_playlist.empty()) {
if (m_playlist.empty())
{
if (m_inetmode)
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
m_x + 10, top + 4, ButtonWidth, 2, AudioPlayerButtons[7]);
::paintButtons(m_x, top, m_width, 2, AudioPlayerButtons[7], m_buttonHeight, ButtonWidth);
else
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
m_x + 10, top + 4, ButtonWidth, 1, &(AudioPlayerButtons[7][0]));
} else if (m_inetmode)
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
m_x + 10, top + 4, ButtonWidth, 4, AudioPlayerButtons[8]);
::paintButtons(m_x, top, m_width, 1, &(AudioPlayerButtons[7][0]), m_buttonHeight, ButtonWidth);
}
else if (m_inetmode)
::paintButtons(m_x, top, m_width, 4, AudioPlayerButtons[8], m_buttonHeight, ButtonWidth);
else
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
m_x + 10, top + 4, ButtonWidth, 4, AudioPlayerButtons[1]);
::paintButtons(m_x, top, m_width, 4, AudioPlayerButtons[1], m_buttonHeight, ButtonWidth);
}
else if (m_key_level == 1)
{
if (m_curr_audiofile.FileType != CFile::STREAM_AUDIO)
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, m_x + 10, top + 4, ButtonWidth, 4, AudioPlayerButtons[0]);
}
::paintButtons(m_x, top, m_width, 4, AudioPlayerButtons[0], m_buttonHeight, ButtonWidth);
else
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, m_x + 10, top + 4, ButtonWidth*2, 2, AudioPlayerButtons[6]);
}
::paintButtons( m_x, top, m_width, 2, AudioPlayerButtons[6], m_buttonHeight, ButtonWidth);
}
else
{ // key_level == 2
if (m_state == CAudioPlayerGui::STOP)
{
if (m_select_title_by_name)
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
m_x + ButtonWidth + 10, top + 4, ButtonWidth, 2, AudioPlayerButtons[5]);
}
::paintButtons(m_x /*+ ButtonWidth*/, top, m_width, 2, AudioPlayerButtons[5], m_buttonHeight, ButtonWidth);
else
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
m_x + ButtonWidth + 10, top + 4, ButtonWidth, 2, AudioPlayerButtons[4]);
}
::paintButtons(m_x/* + ButtonWidth*/, top, m_width, 2, AudioPlayerButtons[4], m_buttonHeight, ButtonWidth);
}
else
{
if (m_select_title_by_name)
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
m_x + ButtonWidth + 10, top + 4, ButtonWidth*2, 2, AudioPlayerButtons[3]);
}
::paintButtons(m_x/* + ButtonWidth*/, top, m_width, 2, AudioPlayerButtons[3], m_buttonHeight, ButtonWidth);
else
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
m_x + ButtonWidth + 10, top + 4, ButtonWidth*2, 2, AudioPlayerButtons[2]);
}
::paintButtons(m_x/* + ButtonWidth*/, top, m_width, 2, AudioPlayerButtons[2], m_buttonHeight, ButtonWidth);
}
}
}