mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
CInfoViewer: try to fix shadow and background behavior in vzap mode
This commit is contained in:
@@ -435,10 +435,21 @@ void CInfoViewer::paintBody()
|
||||
if(zap_mode)
|
||||
h_body -= (g_settings.infobar_casystem_display < 2 ? infoViewerBB->bottom_bar_offset : 0);
|
||||
|
||||
if (body == NULL)
|
||||
if (body == NULL){
|
||||
body = new CComponentsShapeSquare(ChanInfoX, y_body, BoxEndX-ChanInfoX, h_body);
|
||||
else
|
||||
}else{
|
||||
if(txt_cur_event && txt_next_event){
|
||||
if (h_body != body->getHeight() || y_body != body->getYPos()){
|
||||
txt_cur_start->getCTextBoxObject()->clearScreenBuffer();
|
||||
txt_cur_event->getCTextBoxObject()->clearScreenBuffer();
|
||||
txt_cur_event_rest->getCTextBoxObject()->clearScreenBuffer();
|
||||
txt_next_start->getCTextBoxObject()->clearScreenBuffer();
|
||||
txt_next_event->getCTextBoxObject()->clearScreenBuffer();
|
||||
txt_next_in->getCTextBoxObject()->clearScreenBuffer();
|
||||
}
|
||||
}
|
||||
body->setDimensionsAll(ChanInfoX, y_body, BoxEndX-ChanInfoX, h_body);
|
||||
}
|
||||
|
||||
//set corner and shadow modes, consider virtual zap mode
|
||||
body->setCorner(RADIUS_LARGE, (zap_mode) ? CORNER_BOTTOM : CORNER_NONE);
|
||||
@@ -1636,27 +1647,33 @@ void CInfoViewer::display_Info(const char *current, const char *next,
|
||||
bool colored_event_C = (g_settings.theme.colored_events_infobar == 1);
|
||||
bool colored_event_N = (g_settings.theme.colored_events_infobar == 2);
|
||||
|
||||
bool restore = false;
|
||||
if (txt_cur_event){
|
||||
if (txt_cur_event_rest && txt_cur_event_rest->isPainted() && txt_cur_event && txt_cur_event->isPainted())
|
||||
restore = true;
|
||||
}
|
||||
|
||||
//current event
|
||||
if (current && update_current){
|
||||
if (txt_cur_event == NULL)
|
||||
txt_cur_event = new CComponentsTextTransp(NULL, xStart, CurrInfoY - height, currTimeX - xStart - 5, height);
|
||||
else
|
||||
txt_cur_event->setDimensionsAll(xStart, CurrInfoY - height, currTimeX - xStart - 5, height);
|
||||
|
||||
txt_cur_event->setText(current, CTextBox::NO_AUTO_LINEBREAK, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO], colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT);
|
||||
|
||||
if (txt_cur_event_rest && txt_cur_event_rest->isPainted())
|
||||
txt_cur_event_rest->hide();
|
||||
if (txt_cur_event && txt_cur_event->isPainted())
|
||||
if (restore)
|
||||
txt_cur_event->hide();
|
||||
|
||||
txt_cur_event->paint(CC_SAVE_SCREEN_YES);
|
||||
|
||||
if (runningStart){
|
||||
if (txt_cur_start == NULL)
|
||||
txt_cur_start = new CComponentsTextTransp(NULL, InfoX, CurrInfoY - height, info_time_width, height);
|
||||
else
|
||||
txt_cur_start->setDimensionsAll(InfoX, CurrInfoY - height, info_time_width, height);
|
||||
txt_cur_start->setText(runningStart, CTextBox::NO_AUTO_LINEBREAK, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO], colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT);
|
||||
txt_cur_start->paint(CC_SAVE_SCREEN_NO);
|
||||
if (restore)
|
||||
txt_cur_event->hide();
|
||||
txt_cur_start->paint(CC_SAVE_SCREEN_YES);
|
||||
}
|
||||
|
||||
if (runningRest){
|
||||
@@ -1665,6 +1682,8 @@ void CInfoViewer::display_Info(const char *current, const char *next,
|
||||
else
|
||||
txt_cur_event_rest->setDimensionsAll(currTimeX, CurrInfoY - height, currTimeW, height);
|
||||
txt_cur_event_rest->setText(runningRest, CTextBox::RIGHT, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO], colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT);
|
||||
if (restore)
|
||||
txt_cur_event_rest->hide();
|
||||
txt_cur_event_rest->paint(CC_SAVE_SCREEN_YES);
|
||||
}
|
||||
}
|
||||
@@ -1677,7 +1696,9 @@ void CInfoViewer::display_Info(const char *current, const char *next,
|
||||
else
|
||||
txt_next_event->setDimensionsAll(xStart, NextInfoY, nextTimeX - xStart - 5, height);
|
||||
txt_next_event->setText(next, CTextBox::NO_AUTO_LINEBREAK, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO], colored_event_N ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT);
|
||||
txt_next_event->paint(CC_SAVE_SCREEN_NO);
|
||||
if (restore)
|
||||
txt_next_event->hide();
|
||||
txt_next_event->paint(CC_SAVE_SCREEN_YES);
|
||||
|
||||
if (nextStart){
|
||||
if (txt_next_start == NULL)
|
||||
@@ -1685,7 +1706,9 @@ void CInfoViewer::display_Info(const char *current, const char *next,
|
||||
else
|
||||
txt_next_start->setDimensionsAll(InfoX, NextInfoY, info_time_width, height);
|
||||
txt_next_start->setText(nextStart, CTextBox::NO_AUTO_LINEBREAK, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO], colored_event_N ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT);
|
||||
txt_next_start->paint(CC_SAVE_SCREEN_NO);
|
||||
if (restore)
|
||||
txt_next_start->hide();
|
||||
txt_next_start->paint(CC_SAVE_SCREEN_YES);
|
||||
}
|
||||
|
||||
if (nextDuration){
|
||||
@@ -1694,7 +1717,9 @@ void CInfoViewer::display_Info(const char *current, const char *next,
|
||||
else
|
||||
txt_next_in->setDimensionsAll(nextTimeX, NextInfoY, nextTimeW, height);
|
||||
txt_next_in->setText(nextDuration, CTextBox::RIGHT, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO], colored_event_N ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT);
|
||||
txt_next_in->paint(CC_SAVE_SCREEN_NO);
|
||||
if (restore)
|
||||
txt_next_in->hide();
|
||||
txt_next_in->paint(CC_SAVE_SCREEN_YES);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2011,11 +2036,11 @@ void CInfoViewer::killTitle()
|
||||
clock->kill();
|
||||
#endif
|
||||
body->kill();
|
||||
#if 0 //not really required to kill epg infos, body does this
|
||||
if (txt_cur_event)
|
||||
txt_cur_event->kill();
|
||||
if (txt_cur_event_rest)
|
||||
txt_cur_event_rest->kill();
|
||||
#if 0 //not really required to kill epg infos, body does this
|
||||
if (txt_cur_start)
|
||||
txt_cur_start->kill();
|
||||
if (txt_next_start)
|
||||
|
Reference in New Issue
Block a user