mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
icons: add rating-stars to icons.h; version 2.0
Origin commit data
------------------
Commit: 76928f97a1
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-05-29 (Mon, 29 May 2017)
Origin message was:
------------------
- icons: add rating-stars to icons.h; version 2.0
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -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()
|
||||
|
@@ -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);
|
||||
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user