From b56dd4ec4ef4c8af1979d06f3f61274f63b3adad Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 5 Mar 2018 21:52:57 +0100 Subject: [PATCH] infoviewer.cpp: use templates to get reserved width for current/next info This should ensure reserved width for all contained text boxes and and in case of truncated epg info this should be moderate. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/bfbb589258a8afce7b35685c368e860a5a0a6a81 Author: Thilo Graf Date: 2018-03-05 (Mon, 05 Mar 2018) ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index c2d06a835..9fe149ab5 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1831,9 +1831,9 @@ void CInfoViewer::display_Info(const char *current, const char *next, int currTimeW = 0; int nextTimeW = 0; if (runningRest) - currTimeW = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth(runningRest) + OFFSET_INNER_MID; + currTimeW = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth("000 / 000 min") + OFFSET_INNER_MID; if (nextDuration) - nextTimeW = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth(nextDuration) + OFFSET_INNER_MID; + nextTimeW = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth("000 min") + OFFSET_INNER_MID; int currTimeX = BoxEndX - currTimeW - OFFSET_INNER_MID; currTimeX -= analogclock_size + analogclock_offset; //NI int nextTimeX = BoxEndX - nextTimeW - OFFSET_INNER_MID;