mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
infoviewer: add color-to-color gradient feature; THX to TangoCash ...
... for basic inspiration and dbt for some optimizations
Origin commit data
------------------
Branch: ni/coolstream
Commit: 62daf1dc4c
Author: vanhofen <vanhofen@gmx.de>
Date: 2015-05-04 (Mon, 04 May 2015)
Origin message was:
------------------
- infoviewer: add color-to-color gradient feature; THX to TangoCash ...
... for basic inspiration and dbt for some optimizations
------------------
This commit was generated by Migit
This commit is contained in:
@@ -88,8 +88,6 @@ CInfoViewerBB::CInfoViewerBB()
|
||||
bbIconInfo[0].h = 0;
|
||||
BBarY = 0;
|
||||
BBarFontY = 0;
|
||||
hddscale = NULL;
|
||||
sysscale = NULL;
|
||||
|
||||
Init();
|
||||
}
|
||||
@@ -374,8 +372,8 @@ void CInfoViewerBB::showBBButtons(const int modus)
|
||||
}
|
||||
|
||||
if (paint) {
|
||||
paintFoot(minX - g_InfoViewer->ChanInfoX);
|
||||
int last_x = minX;
|
||||
frameBuffer->paintBoxRel(g_InfoViewer->ChanInfoX, BBarY, minX - g_InfoViewer->ChanInfoX, InfoHeightY_Info, COL_INFOBAR_BUTTONS_BACKGROUND, RADIUS_LARGE, CORNER_BOTTOM); //round
|
||||
for (i = BUTTON_MAX; i > 0;) {
|
||||
--i;
|
||||
if ((bbButtonInfo[i].x <= g_InfoViewer->ChanInfoX) || (bbButtonInfo[i].x >= g_InfoViewer->BoxEndX) || (!bbButtonInfo[i].paint))
|
||||
@@ -415,7 +413,7 @@ void CInfoViewerBB::showBBIcons(const int modus, const std::string & icon)
|
||||
return;
|
||||
if ((modus >= CInfoViewerBB::ICON_SUBT) && (modus < CInfoViewerBB::ICON_MAX) && (bbIconInfo[modus].x != -1) && (is_visible)) {
|
||||
frameBuffer->paintIcon(icon, bbIconInfo[modus].x, BBarY,
|
||||
InfoHeightY_Info, 1, true, true, COL_INFOBAR_BUTTONS_BACKGROUND);
|
||||
InfoHeightY_Info, 1, true, !g_settings.theme.infobar_gradient_bottom, COL_INFOBAR_BUTTONS_BACKGROUND);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,7 +430,7 @@ void CInfoViewerBB::paintshowButtonBar()
|
||||
if (g_settings.casystem_display < 2)
|
||||
paintCA_bar(0,0);
|
||||
|
||||
frameBuffer->paintBoxRel(g_InfoViewer->ChanInfoX, BBarY, g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX, InfoHeightY_Info, COL_INFOBAR_BUTTONS_BACKGROUND, RADIUS_LARGE, CORNER_BOTTOM); //round
|
||||
paintFoot();
|
||||
|
||||
g_InfoViewer->showSNR();
|
||||
|
||||
@@ -453,6 +451,21 @@ void CInfoViewerBB::paintshowButtonBar()
|
||||
showSysfsHdd();
|
||||
}
|
||||
|
||||
void CInfoViewerBB::paintFoot(int w)
|
||||
{
|
||||
int width = (w == 0) ? g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX : w;
|
||||
|
||||
CComponentsShapeSquare foot(g_InfoViewer->ChanInfoX, BBarY, width, InfoHeightY_Info);
|
||||
|
||||
foot.setColorBody(COL_INFOBAR_BUTTONS_BACKGROUND);
|
||||
foot.enableColBodyGradient(g_settings.theme.infobar_gradient_bottom);
|
||||
foot.setColBodyGradient(CColorGradient::gradientDark2Light, CFrameBuffer::gradientVertical);
|
||||
foot.setCorner(RADIUS_LARGE, CORNER_BOTTOM);
|
||||
foot.set2ndColor(COL_INFOBAR_PLUS_0);
|
||||
|
||||
foot.paint(CC_SAVE_SCREEN_NO);
|
||||
}
|
||||
|
||||
void CInfoViewerBB::showIcon_SubT()
|
||||
{
|
||||
if (!is_visible)
|
||||
|
Reference in New Issue
Block a user