diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 27cac6a80..51ede9644 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -99,7 +99,7 @@ static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b) extern bool timeset; CInfoViewer::CInfoViewer () - : fader(g_settings.theme.infobar_alpha) + : slider() { sigbox = NULL; header = numbox = body = NULL; @@ -499,7 +499,7 @@ void CInfoViewer::showMovieTitle(const int playState, const t_channel_id &Channe reset_allScala(); if(!is_visible) - fader.StartFadeIn(); + slider.StartSlideIn(); is_visible = true; infoViewerBB->is_visible = true; @@ -666,7 +666,7 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap reset_allScala(); if(!is_visible && !calledFromNumZap) - fader.StartFadeIn(); + slider.StartSlideIn(); is_visible = true; infoViewerBB->is_visible = true; @@ -1114,9 +1114,13 @@ void CInfoViewer::loop(bool show_dot) g_RCInput->postMsg(NeutrinoMessages::SHOW_EPG, 0); res = messages_return::cancel_info; #endif - } else if ((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetFadeTimer())) { - if(fader.FadeDone()) + } else if ((msg == NeutrinoMessages::EVT_TIMER) && (data == slider.GetSlideTimer())) { + if(slider.SlideDone()) res = messages_return::cancel_info; + } else if ((msg == NeutrinoMessages::EVT_SLIDER) && (data == COSDSlider::AFTER_SLIDEIN)) { + // after slide in + } else if ((msg == NeutrinoMessages::EVT_SLIDER) && (data == COSDSlider::BEFORE_SLIDEOUT)) { + // before slide out } else if ((msg == CRCInput::RC_ok) || (CNeutrinoApp::getInstance()->backKey(msg)) || (msg == CRCInput::RC_timeout)) { if ((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) && (msg == CRCInput::RC_ok)) { @@ -1129,8 +1133,8 @@ void CInfoViewer::loop(bool show_dot) hideIt = true; } } - if(fader.StartFadeOut()) - timeoutEnd = CRCInput::calcTimeoutEnd(1); + if(slider.StartSlideOut()) + timeoutEnd = CRCInput::calcTimeoutEnd(2); else res = messages_return::cancel_info; } else if ((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) && ((msg == CRCInput::RC_right) || (msg == CRCInput::RC_left ))) { @@ -1201,7 +1205,7 @@ void CInfoViewer::loop(bool show_dot) } else { if (msg == CRCInput::RC_standby) { g_RCInput->killTimer (sec_timer_id); - fader.StopFade(); + slider.StopSlide(); } res = neutrino->handleMsg (msg, data); if (res & messages_return::unhandled) { @@ -1238,7 +1242,7 @@ void CInfoViewer::loop(bool show_dot) } g_RCInput->killTimer (sec_timer_id); - fader.StopFade(); + slider.StopSlide(); if (zap_mode & IV_MODE_VIRTUAL_ZAP) { /* if bouquet cycle set, do virtual over current bouquet */ if (/*g_settings.zap_cycle && */ /* (bouquetList != NULL) && */ !(bouquetList->Bouquets.empty())) @@ -1411,9 +1415,9 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data) //Set_CA_Status (data); return messages_return::handled; } else if (msg == NeutrinoMessages::EVT_TIMER) { - if (data == fader.GetFadeTimer()) { + if (data == slider.GetSlideTimer()) { // here, the event can only come if there is another window in the foreground! - fader.StopFade(); + slider.StopSlide(); return messages_return::handled; } else if (data == lcdUpdateTimer) { //printf("CInfoViewer::handleMsg: lcdUpdateTimer\n"); diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index 121851014..c81cfbbf3 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -41,10 +41,11 @@ #include #include #include +#include #include "widget/record_info.h" class CFrameBuffer; -class COSDFader; +class COSDSlider; class CInfoViewerBB; class CInfoViewer : public sigc::trackable { @@ -93,7 +94,7 @@ class CInfoViewer : public sigc::trackable t_channel_id current_channel_id; t_channel_id current_epg_id; - COSDFader fader; + COSDSlider slider; int time_width; int time_height;