infoviewer_bb: add frame to CA-bar; default off

Origin commit data
------------------
Branch: ni/coolstream
Commit: 398dfeeab1
Author: vanhofen <vanhofen@gmx.de>
Date: 2015-06-17 (Wed, 17 Jun 2015)

Origin message was:
------------------
- infoviewer_bb: add frame to CA-bar; default off

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2015-06-17 21:36:41 +02:00
parent fbcc56554a
commit f942f65e70
8 changed files with 39 additions and 7 deletions

View File

@@ -689,8 +689,8 @@ void CInfoViewerBB::showBarHdd(int percent)
void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_offset)
{
char buf[20];
int endx = g_InfoViewer->BoxEndX - 10;
int py = g_InfoViewer->BoxEndY + 2; /* hand-crafted, should be automatic */
int endx = g_InfoViewer->BoxEndX - (g_settings.casystem_frame ? 20 : 10);
int py = g_InfoViewer->BoxEndY + (g_settings.casystem_frame ? 4 : 2); /* hand-crafted, should be automatic */
int px = 0;
static map<int, std::pair<int,const char*> > icon_map;
const int icon_space = 10, icon_number = 10;
@@ -816,21 +816,37 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst)
void CInfoViewerBB::paintCA_bar(int left, int right)
{
int xcnt = (g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX) / 4;
int ycnt = bottom_bar_offset / 4;
int xcnt = (g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - (g_settings.casystem_frame ? 24 : 0)) / 4;
int ycnt = (bottom_bar_offset - (g_settings.casystem_frame ? 14 : 0)) / 4;
if (right)
right = xcnt - ((right/4)+1);
if (left)
left = xcnt - ((left/4)-1);
frameBuffer->paintBox(g_InfoViewer->ChanInfoX + (right*4), g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset, COL_BLACK);
if (g_settings.casystem_frame) { // with highlighted frame
if (!right || !left) { // paint full bar
// background
frameBuffer->paintBox(g_InfoViewer->ChanInfoX , g_InfoViewer->BoxEndY , g_InfoViewer->BoxEndX , g_InfoViewer->BoxEndY + bottom_bar_offset , COL_INFOBAR_PLUS_0);
// shadow
frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 14, g_InfoViewer->BoxEndY + 4, g_InfoViewer->BoxEndX - 6 , g_InfoViewer->BoxEndY + bottom_bar_offset - 6 , COL_INFOBAR_SHADOW_PLUS_0 , RADIUS_SMALL, CORNER_ALL);
// ca bar
frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 11, g_InfoViewer->BoxEndY + 1, g_InfoViewer->BoxEndX - 11, g_InfoViewer->BoxEndY + bottom_bar_offset - 11, COL_INFOBAR_PLUS_0 , RADIUS_SMALL, CORNER_ALL);
// highlighed frame
frameBuffer->paintBoxFrame(g_InfoViewer->ChanInfoX + 10, g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - 2*10, bottom_bar_offset - 10, 1, COL_INFOBAR_PLUS_3, RADIUS_SMALL, CORNER_ALL);
}
else
frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 12 + (right*4), g_InfoViewer->BoxEndY + 2, g_InfoViewer->BoxEndX - 12 - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset - 12, COL_INFOBAR_PLUS_0);
}
else
frameBuffer->paintBox(g_InfoViewer->ChanInfoX + (right*4), g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset, COL_BLACK);
if (left)
left -= 1;
for (int i = 0 + right; i < xcnt - left; i++) {
for (int j = 0; j < ycnt; j++) {
frameBuffer->paintBoxRel((g_InfoViewer->ChanInfoX + 2) + i*4, g_InfoViewer->BoxEndY + 2 + j*4, 2, 2, COL_INFOBAR_PLUS_1);
frameBuffer->paintBoxRel((g_InfoViewer->ChanInfoX + (g_settings.casystem_frame ? 14 : 2)) + i*4, g_InfoViewer->BoxEndY + (g_settings.casystem_frame ? 4 : 2) + j*4, 2, 2, COL_INFOBAR_PLUS_1);
}
}
}
@@ -858,7 +874,7 @@ void CInfoViewerBB::reset_allScala()
void CInfoViewerBB::setBBOffset()
{
bottom_bar_offset = (g_settings.casystem_display < 2) ? 22 : 0;
bottom_bar_offset = (g_settings.casystem_display < 2) ? (g_settings.casystem_frame ? 36 : 22) : 0;
}
void* CInfoViewerBB::scrambledThread(void *arg)