infoviewer: better integration of 71e7e0e319

Origin commit data
------------------
Branch: ni/coolstream
Commit: 3f5ba1de11
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-09-18 (Sat, 18 Sep 2021)

Origin message was:
------------------
- infoviewer: better integration of 71e7e0e319

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2021-09-18 01:23:45 +02:00
parent 71e7e0e319
commit 795041504a

View File

@@ -1689,18 +1689,22 @@ void CInfoViewer::showSNR ()
{
if (!is_visible)
return;
int renderFlag = ((g_settings.theme.infobar_gradient_top) ? Font::FULLBG : 0) | Font::IS_UTF8;
/* right now, infobar_show_channellogo == 3 is the trigger for signal bars etc.
TODO: decouple this */
if (!fileplay && !IS_WEBCHAN(current_channel_id) && ( g_settings.infobar_show_channellogo == 3 || g_settings.infobar_show_channellogo == 5 || g_settings.infobar_show_channellogo == 6 )) {
if (g_settings.infobar_show_channellogo == 3 || g_settings.infobar_show_channellogo == 5 || g_settings.infobar_show_channellogo == 6)
{
if (!IS_WEBCHAN(current_channel_id) && !fileplay)
{
int y_freq = 2 * g_SignalFont->getHeight();
if (!g_settings.infobar_sat_display)
y_freq -= g_SignalFont->getHeight() / 2; //half line up to center freq vertically
int y_numbox = numbox->getYPos();
if ((newfreq && chanready) || SDT_freq_update) {
if ((newfreq && chanready) || SDT_freq_update)
{
char freq[22];
newfreq = false;
std::string polarisation = "";
if (CFrontend::isSat(CFEManager::getInstance()->getLiveFE()->getCurrentDeliverySystem()))
@@ -1718,7 +1722,8 @@ void CInfoViewer::showSNR ()
g_SignalFont->RenderString(BoxStartX + numbox_offset + ((numbox_maxtxtwidth - freqWidth) / 2), y_numbox + y_freq - 3, freqWidth, freq, SDT_freq_update ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT, 0, renderFlag);
SDT_freq_update = false;
}
if (sigbox == NULL){
if (sigbox == NULL)
{
int sigbox_offset = OFFSET_INNER_MID;
sigbox = new CSignalBox(BoxStartX + sigbox_offset, y_numbox + ChanHeight / 2, ChanWidth - 2 * sigbox_offset, ChanHeight / 2, NULL, true, NULL, "S", "Q");
sigbox->setItemName("SIGBOX");
@@ -1732,8 +1737,7 @@ void CInfoViewer::showSNR ()
sigbox->setFrontEnd(CFEManager::getInstance()->getLiveFE());
sigbox->paint(CC_SAVE_SCREEN_NO);
}
// TODO: better integration
else if (IS_WEBCHAN(current_channel_id) && ( g_settings.infobar_show_channellogo == 3 || g_settings.infobar_show_channellogo == 5 || g_settings.infobar_show_channellogo == 6 ))
else if (IS_WEBCHAN(current_channel_id))
{
const char *icon = NULL;
int mode = CNeutrinoApp::getInstance()->getMode();
@@ -1746,15 +1750,19 @@ void CInfoViewer::showSNR ()
icon = NEUTRINO_ICON_HINT_WEBRADIO;
break;
default: // NeutrinoMode not set yet
icon = NEUTRINO_ICON_PLAY;
//icon = NEUTRINO_ICON_PLAY;
break;
}
if (icon)
{
int icon_w = 0, icon_h = 0;
frameBuffer->getIconSize(icon, &icon_w, &icon_h);
int icon_x = BoxStartX + ChanWidth / 2 - icon_w / 2;
int icon_y = BoxStartY + g_SignalFont->getHeight() + (ChanHeight - g_SignalFont->getHeight()) / 2 - icon_h / 2;
frameBuffer->paintIcon(icon, icon_x, icon_y);
}
}
}
if (showButtonBar)
infoViewerBB->showSysfsHdd();
}