From 16c26cc10323508fcd9f497f11c6578555756ec5 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 3 Jan 2016 14:29:20 +0100 Subject: [PATCH] CInfoViewer: try to fix overlapping current info and curren/next time info This effect was heavy to reproduce, but some useres had such effects. Hold saved background and hide() ensure clean background before repaint title and rest. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/ec701e310823dcb61a045289f094445d3f3a54a0 Author: Thilo Graf Date: 2016-01-03 (Sun, 03 Jan 2016) --- src/gui/infoviewer.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index a10312dd0..81189ffa5 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1624,7 +1624,13 @@ void CInfoViewer::display_Info(const char *current, const char *next, 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); - txt_cur_event->paint(CC_SAVE_SCREEN_NO); + + if (txt_cur_event_rest && txt_cur_event_rest->isPainted()) + txt_cur_event_rest->hide(); + if (txt_cur_event && txt_cur_event->isPainted()) + 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); @@ -1640,7 +1646,7 @@ 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); - txt_cur_event_rest->paint(CC_SAVE_SCREEN_NO); + txt_cur_event_rest->paint(CC_SAVE_SCREEN_YES); } } @@ -1981,18 +1987,18 @@ void CInfoViewer::killTitle() sigbox->kill(); #endif header->kill(); -#if 0 //not really required to kill clock, body does this +#if 0 //not really required to kill clock, header does this if (clock) clock->kill(); #endif body->kill(); -#if 0 //not really required to kill epg infos, body does this - if (txt_cur_start) - txt_cur_start->kill(); 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) txt_next_start->kill(); if (txt_next_event)