diff --git a/src/gui/components/cc_item_progressbar.cpp b/src/gui/components/cc_item_progressbar.cpp index b4bdabe73..a04fce28c 100644 --- a/src/gui/components/cc_item_progressbar.cpp +++ b/src/gui/components/cc_item_progressbar.cpp @@ -547,24 +547,8 @@ void CProgressBar::paintGraphic() //NI starbar void CProgressBar::paintStarBar() { - std::ostringstream buf; - graphic_file = "stars"; - - buf.str(""); - buf << ICONSDIR_VAR << "/" << graphic_file << ".png"; - if (access(buf.str().c_str(), F_OK) != 0) { - buf.str(""); - buf << ICONSDIR << "/" << graphic_file << ".png"; - } - std::string pb_active_graphic(buf.str()); - - buf.str(""); - buf << ICONSDIR_VAR << "/" << graphic_file << "_bg.png"; - if (access(buf.str().c_str(), F_OK) != 0) { - buf.str(""); - buf << ICONSDIR << "/" << graphic_file << "_bg.png"; - } - std::string pb_passive_graphic(buf.str()); + std::string pb_active_graphic(frameBuffer->getIconPath(NEUTRINO_ICON_STARS)); + std::string pb_passive_graphic(frameBuffer->getIconPath(NEUTRINO_ICON_STARS_BG)); int stars_w = 0, stars_h = 0; g_PicViewer->getSize(pb_passive_graphic.c_str(), &stars_w, &stars_h); diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 255d0eb45..38649411d 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -321,7 +321,7 @@ void CEpgData::showText(int startPos, int ypos, bool has_cover, bool fullClear) stars *= 10; // recalculate stars value for starbar int stars_w = 0, stars_h = 0; - g_PicViewer->getSize(imdb->stars_bg.c_str(), &stars_w, &stars_h); + frameBuffer->getIconSize(NEUTRINO_ICON_STARS_BG, &stars_w, &stars_h); //create starbar item CProgressBar *cc_starbar = new CProgressBar(); @@ -331,8 +331,8 @@ void CEpgData::showText(int startPos, int ypos, bool has_cover, bool fullClear) if (imdb_active) { - int _x = sx+OFFSET_INNER_MID+cover_offset+logo_offset+stars_w+OFFSET_INNER_MID; - int _w = ox-OFFSET_INNER_MID-cover_offset-logo_offset-stars_w-OFFSET_INNER_MID; + int _x = sx+OFFSET_INNER_MID+cover_offset+logo_offset+cc_starbar->getWidth()+OFFSET_INNER_MID; + int _w = ox-OFFSET_INNER_MID-cover_offset-logo_offset-cc_starbar->getWidth()-OFFSET_INNER_MID; g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(_x, y+medlineheight, _w, imdb_rating, COL_MENUCONTENT_TEXT, 0, true); } } diff --git a/src/gui/imdb.cpp b/src/gui/imdb.cpp index 39003b921..3c68fa965 100644 --- a/src/gui/imdb.cpp +++ b/src/gui/imdb.cpp @@ -49,8 +49,6 @@ CIMDB::CIMDB() imdb_outfile = "/tmp/imdb.json"; omdb_apikey = "&apikey=20711f9e"; posterfile = "/tmp/imdb.jpg"; - stars_bg = ICONSDIR "/stars_bg.png"; - stars = ICONSDIR "/stars.png"; } CIMDB::~CIMDB() diff --git a/src/gui/imdb.h b/src/gui/imdb.h index 82928a632..c6e5d952d 100644 --- a/src/gui/imdb.h +++ b/src/gui/imdb.h @@ -42,9 +42,6 @@ class CIMDB std::string search_error; std::string imdb_outfile; std::string posterfile; - std::string stars_bg; - std::string stars; - int getIMDb(const std::string& epgTitle); std::string getFilename(CZapitChannel * channel, uint64_t id); diff --git a/src/gui/widget/icons.h b/src/gui/widget/icons.h index 345a9d041..818f07a1a 100644 --- a/src/gui/widget/icons.h +++ b/src/gui/widget/icons.h @@ -183,6 +183,8 @@ #define NEUTRINO_ICON_PIP "pip" #define NEUTRINO_ICON_STAR_ON "star-on" #define NEUTRINO_ICON_STAR_OFF "star-off" +#define NEUTRINO_ICON_STARS_BG "stars_bg" //NI +#define NEUTRINO_ICON_STARS "stars" //NI #define NEUTRINO_ICON_TMDB "tmdb" #define NEUTRINO_ICON_IMDB "imdb" #define NEUTRINO_ICON_PICTUREVIEWER "pictureviewer"