mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-17 10:23:37 +02:00
optional colouring of NOW or NEXT event in infobar (patch by svenhoefer)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1662 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: d93630be48
Author: gixxpunk <thomas.harfmann@gmail.com>
Date: 2011-09-04 (Sun, 04 Sep 2011)
Origin message was:
------------------
- optional colouring of NOW or NEXT event in infobar (patch by svenhoefer)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1662 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -33,7 +33,8 @@
|
||||
#ifndef __color__
|
||||
#define __color__
|
||||
|
||||
#define COL_MAXFREE 254-8*7 - 1
|
||||
#define COL_MAXFREE 254-8*8 - 1
|
||||
#define COL_COLORED_EVENTS_INFOBAR 254-8*8
|
||||
#define COL_INFOBAR_SHADOW 254-8*7
|
||||
#define COL_INFOBAR 254-8*6
|
||||
#define COL_MENUHEAD 254-8*5
|
||||
|
@@ -1652,6 +1652,14 @@ void CInfoViewer::display_Info(const char *current, const char *next,
|
||||
if (starttimes)
|
||||
xStart += info_time_width + 10;
|
||||
|
||||
//colored_events init
|
||||
bool colored_event_C = false;
|
||||
bool colored_event_N = false;
|
||||
if (g_settings.colored_events == 1)
|
||||
colored_event_C = true;
|
||||
if (g_settings.colored_events == 2)
|
||||
colored_event_N = true;
|
||||
|
||||
if (pb_pos > -1)
|
||||
{
|
||||
int pb_w = 112;
|
||||
@@ -1678,8 +1686,8 @@ void CInfoViewer::display_Info(const char *current, const char *next,
|
||||
{
|
||||
frameBuffer->paintBox(InfoX, CurrInfoY - height, currTimeX, CurrInfoY, COL_INFOBAR_PLUS_0);
|
||||
if (runningStart != NULL)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(InfoX, CurrInfoY, info_time_width, runningStart, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(xStart, CurrInfoY, currTimeX - xStart - 5, current, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(InfoX, CurrInfoY, info_time_width, runningStart, colored_event_C ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(xStart, CurrInfoY, currTimeX - xStart - 5, current, colored_event_C ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
oldCurrTimeX = currTimeX;
|
||||
}
|
||||
|
||||
@@ -1688,19 +1696,19 @@ void CInfoViewer::display_Info(const char *current, const char *next,
|
||||
frameBuffer->paintBox(oldCurrTimeX, CurrInfoY-height, BoxEndX, CurrInfoY, COL_INFOBAR_PLUS_0);
|
||||
oldCurrTimeX = currTimeX;
|
||||
if (currTimeW != 0)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(currTimeX, CurrInfoY, currTimeW, runningRest, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(currTimeX, CurrInfoY, currTimeW, runningRest, colored_event_C ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
|
||||
if (next != NULL && update_next)
|
||||
{
|
||||
frameBuffer->paintBox(InfoX, NextInfoY-height, BoxEndX, NextInfoY, COL_INFOBAR_PLUS_0);
|
||||
if (nextStart != NULL)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(InfoX, NextInfoY, info_time_width, nextStart, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(InfoX, NextInfoY, info_time_width, nextStart, colored_event_N ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
if (starttimes)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(xStart, NextInfoY, nextTimeX - xStart - 5, next, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(xStart, NextInfoY, nextTimeX - xStart - 5, next, colored_event_N ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
else
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(xStart, NextInfoY, nextTimeX - xStart - 5, next, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(xStart, NextInfoY, nextTimeX - xStart - 5, next, colored_event_N ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
if (nextTimeW != 0)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(nextTimeX, NextInfoY, nextTimeW, nextDuration, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(nextTimeX, NextInfoY, nextTimeW, nextDuration, colored_event_N ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -261,6 +261,14 @@ const CMenuOptionChooser::keyval CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS[CHANNE
|
||||
{ 1 , LOCALE_CHANNELLIST_EPGTEXT_ALIGN_RIGHT }
|
||||
};
|
||||
|
||||
#define OPTIONS_COLORED_EVENTS_OPTION_COUNT 3
|
||||
const CMenuOptionChooser::keyval OPTIONS_COLORED_EVENTS_OPTIONS[OPTIONS_COLORED_EVENTS_OPTION_COUNT] =
|
||||
{
|
||||
{ 0, LOCALE_EXTRA_COLORED_EVENTS_0 }, //none
|
||||
{ 1, LOCALE_EXTRA_COLORED_EVENTS_1 }, //current
|
||||
{ 2, LOCALE_EXTRA_COLORED_EVENTS_2 }, //next
|
||||
};
|
||||
|
||||
|
||||
//show osd setup
|
||||
void COsdSetup::showOsdSetup()
|
||||
@@ -318,6 +326,7 @@ void COsdSetup::showOsdSetup()
|
||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true ));
|
||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_BIGWINDOWS, &g_settings.big_windows, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_PROGRESSBAR_COLOR, &g_settings.progressbar_color, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_COLORED_EVENTS, &g_settings.colored_events, OPTIONS_COLORED_EVENTS_OPTIONS, OPTIONS_COLORED_EVENTS_OPTION_COUNT, true));
|
||||
|
||||
osd_menu->exec(NULL, "");
|
||||
osd_menu->hide();
|
||||
@@ -370,6 +379,12 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
|
||||
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORSTATUSBAR_TEXT));
|
||||
menu_colors->addItem( new CMenuForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chInfobarcolor ));
|
||||
menu_colors->addItem( new CMenuForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chInfobarTextcolor ));
|
||||
|
||||
CColorChooser* chColored_Events = new CColorChooser(LOCALE_COLORMENU_TEXTCOLOR, &g_settings.colored_events_red,
|
||||
&g_settings.colored_events_green, &g_settings.colored_events_blue, NULL, colorSetupNotifier);
|
||||
|
||||
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_EXTRA_COLORED_EVENTS));
|
||||
menu_colors->addItem( new CMenuForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chColored_Events ));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -232,6 +232,10 @@ void CThemes::rememberOldTheme(bool remember)
|
||||
oldThemeValues[37] = g_settings.infobar_Text_red;
|
||||
oldThemeValues[38] = g_settings.infobar_Text_green;
|
||||
oldThemeValues[39] = g_settings.infobar_Text_blue;
|
||||
oldThemeValues[40] = g_settings.colored_events_alpha;
|
||||
oldThemeValues[41] = g_settings.colored_events_red;
|
||||
oldThemeValues[42] = g_settings.colored_events_green;
|
||||
oldThemeValues[43] = g_settings.colored_events_blue;
|
||||
} else {
|
||||
g_settings.menu_Head_alpha = oldThemeValues[0];
|
||||
g_settings.menu_Head_red = oldThemeValues[1];
|
||||
@@ -273,6 +277,10 @@ void CThemes::rememberOldTheme(bool remember)
|
||||
g_settings.infobar_Text_red = oldThemeValues[37];
|
||||
g_settings.infobar_Text_green = oldThemeValues[38];
|
||||
g_settings.infobar_Text_blue = oldThemeValues[39];
|
||||
g_settings.colored_events_alpha = oldThemeValues[40];
|
||||
g_settings.colored_events_red = oldThemeValues[41];
|
||||
g_settings.colored_events_green = oldThemeValues[42];
|
||||
g_settings.colored_events_blue = oldThemeValues[43];
|
||||
|
||||
notifier = new CColorSetupNotifier;
|
||||
notifier->changeNotify(NONEXISTANT_LOCALE, NULL);
|
||||
|
@@ -35,7 +35,7 @@ class CThemes : public CMenuTarget, CChangeObserver
|
||||
CColorSetupNotifier *notifier;
|
||||
|
||||
int width;
|
||||
int oldThemeValues[40];
|
||||
int oldThemeValues[44];
|
||||
|
||||
bool hasThemeChanged;
|
||||
|
||||
|
Reference in New Issue
Block a user