mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
- channellist: allow to show resolution icons
Conflicts: data/locale/deutsch.locale data/locale/english.locale src/system/locals.h src/system/locals_intern.h Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -1970,6 +1970,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())
|
||||
@@ -1986,6 +1998,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