mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
channellist: allow to show resolution icons
Origin commit data
------------------
Branch: ni/coolstream
Commit: 114bc9f4be
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-06-24 (Sun, 24 Jun 2018)
Origin message was:
------------------
- channellist: allow to show resolution icons
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1993,6 +1993,18 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
|
||||
pip_icon = NEUTRINO_ICON_MARKER_PIP;
|
||||
#endif
|
||||
|
||||
//set resolution icon
|
||||
const char *res_icon = NULL;
|
||||
if (g_settings.channellist_show_res_icon)
|
||||
{
|
||||
if (chan->isHD())
|
||||
res_icon = NEUTRINO_ICON_MARKER_HD;
|
||||
else if (chan->isUHD())
|
||||
res_icon = NEUTRINO_ICON_MARKER_UHD;
|
||||
else
|
||||
res_icon = NEUTRINO_ICON_MARKER_SD;
|
||||
}
|
||||
|
||||
//set webtv icon
|
||||
const char *webtv_icon = NULL;
|
||||
if (!chan->getUrl().empty())
|
||||
@@ -2009,6 +2021,16 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
|
||||
int offset_right = OFFSET_INNER_MID;
|
||||
int icon_x_right = x + width - SCROLLBAR_WIDTH - offset_right;
|
||||
|
||||
if (res_icon)
|
||||
{
|
||||
frameBuffer->getIconSize(res_icon, &icon_w, &icon_h);
|
||||
if (frameBuffer->paintIcon(res_icon, icon_x_right - icon_w, ypos, fheight))
|
||||
{
|
||||
offset_right += icon_w + OFFSET_INNER_MID;
|
||||
icon_x_right -= icon_w + OFFSET_INNER_MID;
|
||||
}
|
||||
}
|
||||
|
||||
if (scramble_icon)
|
||||
{
|
||||
frameBuffer->getIconSize(scramble_icon, &icon_w, &icon_h);
|
||||
|
Reference in New Issue
Block a user