Conflicts:
	src/gui/infoviewer_bb.cpp


Origin commit data
------------------
Branch: ni/coolstream
Commit: be717654eb
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-12-12 (Mon, 12 Dec 2016)



------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-12-12 11:22:50 +01:00
2 changed files with 29 additions and 51 deletions

View File

@@ -89,7 +89,8 @@ CInfoViewerBB::CInfoViewerBB()
bbIconInfo[0].h = 0; bbIconInfo[0].h = 0;
BBarY = 0; BBarY = 0;
BBarFontY = 0; BBarFontY = 0;
foot = cabar = NULL; foot = NULL;
ca_bar = NULL;
Init(); Init();
} }
@@ -482,7 +483,7 @@ void CInfoViewerBB::paintshowButtonBar()
g_InfoViewer->sec_timer_id = g_RCInput->addTimer(1*1000*1000, false); g_InfoViewer->sec_timer_id = g_RCInput->addTimer(1*1000*1000, false);
if (g_settings.infobar_casystem_display < 2) if (g_settings.infobar_casystem_display < 2)
paintCA_bar(0,0); paint_ca_bar();
paintFoot(); paintFoot();
@@ -862,13 +863,6 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst)
} }
if(!notfirst) { if(!notfirst) {
#if 0
static int icon_space_offset = 0;
if ((g_settings.infobar_casystem_display == 1) && (icon_space_offset)) {
paintCA_bar(0,icon_space_offset);
icon_space_offset = 0;
}
#endif
//NI - check ecm.info //NI - check ecm.info
acaid = check_ecmInfo(); acaid = check_ecmInfo();
if(acaid == 0){ if(acaid == 0){
@@ -916,52 +910,36 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst)
} }
} }
void CInfoViewerBB::paintCA_bar(int left, int right) void CInfoViewerBB::paint_ca_bar()
{ {
initBBOffset(); initBBOffset();
int xcnt = (g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - (g_settings.infobar_casystem_frame ? 24 : 0)) / 4;
int ycnt = (bottom_bar_offset - (g_settings.infobar_casystem_frame ? 14 : 0)) / 4;
int ca_width = g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX; int ca_width = g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX;
if (right) if (g_settings.infobar_casystem_frame)
right = xcnt - ((right/4)+1); {
if (left) if (ca_bar == NULL)
left = xcnt - ((left/4)-1); ca_bar = new CComponentsShapeSquare(g_InfoViewer->ChanInfoX + OFFSET_INNER_MID, g_InfoViewer->BoxEndY, ca_width - 2*OFFSET_INNER_MID, bottom_bar_offset - OFFSET_INNER_MID, NULL, CC_SHADOW_ON, COL_INFOBAR_CASYSTEM_PLUS_2, COL_INFOBAR_CASYSTEM_PLUS_0);
ca_bar->enableShadow(CC_SHADOW_ON, OFFSET_SHADOW/2, true);
if (g_settings.infobar_casystem_frame) { // with highlighted frame ca_bar->setFrameThickness(2);
if (!right || !left) { // paint full bar ca_bar->setCorner(RADIUS_SMALL, CORNER_ALL);
// framed ca bar ca_bar->paint(CC_SAVE_SCREEN_NO);
if (cabar == NULL)
cabar = new CComponentsShapeSquare(g_InfoViewer->ChanInfoX+11, g_InfoViewer->BoxEndY+1, ca_width-22 , bottom_bar_offset-11 , NULL, CC_SHADOW_ON, COL_INFOBAR_CASYSTEM_PLUS_2, COL_INFOBAR_CASYSTEM_PLUS_0);
//cabar->setCorner(RADIUS_SMALL, CORNER_ALL);
cabar->enableShadow(CC_SHADOW_ON, 3, true);
cabar->setFrameThickness(2);
// cabar->paint(CC_SAVE_SCREEN_NO);
}else{ //TODO: remove this part, cabar object can do this
if (cabar == NULL)
cabar = new CComponentsShapeSquare(g_InfoViewer->ChanInfoX, g_InfoViewer->BoxEndY, ca_width , bottom_bar_offset-11, NULL, CC_SHADOW_OFF, COL_INFOBAR_CASYSTEM_PLUS_2);
//cabar->setCorner(RADIUS_SMALL, CORNER_ALL);
cabar->disableShadow();
cabar->setFrameThickness(2);
cabar->setColorBody(COL_INFOBAR_CASYSTEM_PLUS_0);
}
cabar->setFrameThickness(2);
cabar->setCorner(RADIUS_SMALL, CORNER_ALL);
cabar->paint(CC_SAVE_SCREEN_NO);
} }
else else
{
paintBoxRel(g_InfoViewer->ChanInfoX, g_InfoViewer->BoxEndY, ca_width , bottom_bar_offset, COL_INFOBAR_CASYSTEM_PLUS_0); paintBoxRel(g_InfoViewer->ChanInfoX, g_InfoViewer->BoxEndY, ca_width , bottom_bar_offset, COL_INFOBAR_CASYSTEM_PLUS_0);
}
#if 1 #if 1
if (!g_settings.infobar_casystem_dotmatrix) //don't show dotmatrix if (g_settings.infobar_casystem_dotmatrix)
return; {
int xcnt = (g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - (g_settings.infobar_casystem_frame ? 24 : 0)) / 4;
int ycnt = (bottom_bar_offset - (g_settings.infobar_casystem_frame ? 14 : 0)) / 4;
if (left) for (int i = 0; i < xcnt; i++)
left -= 1; {
for (int j = 0; j < ycnt; j++)
for (int i = 0 + right; i < xcnt - left; i++) { {
for (int j = 0; j < ycnt; j++) { frameBuffer->paintBoxRel((g_InfoViewer->ChanInfoX + (g_settings.infobar_casystem_frame ? 14 : 2)) + i*4, g_InfoViewer->BoxEndY + (g_settings.infobar_casystem_frame ? 4 : 2) + j*4, 2, 2, COL_INFOBAR_PLUS_1);
frameBuffer->paintBoxRel((g_InfoViewer->ChanInfoX + (g_settings.infobar_casystem_frame ? 14 : 2)) + i*4, g_InfoViewer->BoxEndY + (g_settings.infobar_casystem_frame ? 4 : 2) + j*4, 2, 2, COL_INFOBAR_PLUS_1); }
} }
} }
#endif #endif
@@ -999,8 +977,8 @@ void CInfoViewerBB::ResetModules()
if (foot){ if (foot){
delete foot; foot = NULL; delete foot; foot = NULL;
} }
if (cabar){ if (ca_bar){
delete cabar; cabar = NULL; delete ca_bar; ca_bar = NULL;
} }
} }

View File

@@ -117,14 +117,14 @@ class CInfoViewerBB
pthread_t scrambledT; pthread_t scrambledT;
CProgressBar *hddscale, *sysscale; CProgressBar *hddscale, *sysscale;
CComponentsShapeSquare *foot, *cabar; CComponentsShapeSquare *foot, *ca_bar;
void paintFoot(int w = 0); void paintFoot(int w = 0);
void showBBIcons(const int modus, const std::string & icon); void showBBIcons(const int modus, const std::string & icon);
void getBBIconInfo(void); void getBBIconInfo(void);
bool checkBBIcon(const char * const icon, int *w, int *h); bool checkBBIcon(const char * const icon, int *w, int *h);
void paint_ca_icons(int, const char*, int&); void paint_ca_icons(int, const char*, int&);
void paintCA_bar(int,int); void paint_ca_bar();
void showOne_CAIcon(); void showOne_CAIcon();
static void* scrambledThread(void *arg); static void* scrambledThread(void *arg);
@@ -159,7 +159,7 @@ class CInfoViewerBB
void initBBOffset(void); void initBBOffset(void);
// modules // modules
CComponentsShapeSquare* getFooter(void){return foot;} CComponentsShapeSquare* getFooter(void){return foot;}
CComponentsShapeSquare* getCABar(void){return cabar;} CComponentsShapeSquare* getCABar(void){return ca_bar;}
void ResetModules(void); void ResetModules(void);
void changePB(void); void changePB(void);
}; };