From 81afac71acd28ba17d45b24ba4496964a443b222 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 3 Aug 2016 00:12:29 +0200 Subject: [PATCH] epgview: fix y-position of tmdb-logo and rating-stars Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/25e29c30bec7e93ac75b8f749004ef72eff3ab12 Author: vanhofen Date: 2016-08-03 (Wed, 03 Aug 2016) Origin message was: ------------------ - epgview: fix y-position of tmdb-logo and rating-stars ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/epgview.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index c0bbd2dd3..5251fe627 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -274,19 +274,21 @@ void CEpgData::showText(int startPos, int ypos, bool has_cover, bool fullClear) } } int logo_offset = 0; - if (tmdb_active && startPos == 0) { - int icon_w,icon_h; + int icon_w = 0; + int icon_h = 0; + if (tmdb_active && startPos == 0) + { frameBuffer->getIconSize(NEUTRINO_ICON_TMDB, &icon_w, &icon_h); - frameBuffer->paintIcon(NEUTRINO_ICON_TMDB, sx+10+cover_offset, ypos+10); + frameBuffer->paintIcon(NEUTRINO_ICON_TMDB, sx+10+cover_offset, y+(medlineheight-icon_h)/2); logo_offset = icon_w + 10; } - if (stars > 0 && startPos == 0) { - int icon_w,icon_h; + if (stars > 0 && startPos == 0) + { frameBuffer->getIconSize(NEUTRINO_ICON_STAR_OFF, &icon_w, &icon_h); for (int i = 0; i < 10; i++) - frameBuffer->paintIcon(NEUTRINO_ICON_STAR_OFF, sx+10+cover_offset+logo_offset + i*(icon_w+3), y+10); + frameBuffer->paintIcon(NEUTRINO_ICON_STAR_OFF, sx+10+cover_offset+logo_offset + i*(icon_w+3), y+(medlineheight-icon_h)/2); for (int i = 0; i < stars; i++) - frameBuffer->paintIcon(NEUTRINO_ICON_STAR_ON, sx+10+cover_offset+logo_offset + i*(icon_w+3), y+10); + frameBuffer->paintIcon(NEUTRINO_ICON_STAR_ON, sx+10+cover_offset+logo_offset + i*(icon_w+3), y+(medlineheight-icon_h)/2); } for (int i = startPos; i < textSize && i < startPos + medlinecount; i++, y += medlineheight) {