From 2283128d56a025bc723d1a59ca71160e775a5966 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 8 Feb 2022 00:11:01 +0100 Subject: [PATCH] infoviewer: More simplified rec-info implementation. More simplified rec-info implementation, enable own blinking effect of rec object and align background to info bar gradient settings. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d77db3f01473cb30d874b78a2719d7fe3b0b8e8b Author: Thilo Graf Date: 2022-02-08 (Tue, 08 Feb 2022) ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 27470edf2..583a36e36 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -318,20 +318,9 @@ void CInfoViewer::showRecordIcon (const bool show) rec->setFrameThickness(FRAME_WIDTH_NONE); rec->setShadowWidth(OFFSET_SHADOW/2); rec->setCorner(RADIUS_MIN, CORNER_ALL); + rec->enableColBodyGradient(g_settings.theme.infobar_gradient_top, g_settings.theme.infobar_gradient_top ? COL_INFOBAR_PLUS_0 : header->getColorBody(), g_settings.theme.infobar_gradient_top_direction); + rec->paintBlink(500); } - - if (rec->isPainted()) - { - if (rec->getCCItem(0)) - { - if (rec->getCCItem(0)->isPainted()) - rec->getCCItem(0)->kill(); - else - rec->getCCItem(0)->paint(); - } - } - else - rec->paint(); } } @@ -2110,7 +2099,11 @@ void CInfoViewer::killTitle() sigbox->kill(); #endif if (rec) - rec->kill(); + { + rec->cancelBlink(); + delete rec; + rec = NULL; + } if (timescale && (g_settings.infobar_progressbar == SNeutrinoSettings::INFOBAR_PROGRESSBAR_ARRANGEMENT_DEFAULT)) timescale->kill();