- channellist: better readability for right-aligned list

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1749 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
striper
2011-10-05 16:52:27 +00:00
parent 0b248f1c05
commit 0f5bac8050
2 changed files with 33 additions and 5 deletions

View File

@@ -1818,6 +1818,7 @@ void CChannelList::paintItem(int pos)
bool iscurrent = true; bool iscurrent = true;
bool paintbuttons = false; bool paintbuttons = false;
unsigned int curr = liststart + pos; unsigned int curr = liststart + pos;
int rec_mode;
#if 0 #if 0
if(CNeutrinoApp::getInstance()->recordingstatus && !autoshift && curr < chanlist.size()) { if(CNeutrinoApp::getInstance()->recordingstatus && !autoshift && curr < chanlist.size()) {
@@ -1864,9 +1865,36 @@ void CChannelList::paintItem(int pos)
} else { } else {
p_event = &chan->currentEvent; p_event = &chan->currentEvent;
} }
if (pos == 0)
{
int w_max, w_min, h;
ChannelList_Rec = 0;
int recmode_icon_max = CRecordManager::RECMODE_REC, recmode_icon_min = CRecordManager::RECMODE_TSHIFT;
frameBuffer->getIconSize(NEUTRINO_ICON_REC, &w_max, &h);
frameBuffer->getIconSize(NEUTRINO_ICON_AUTO_SHIFT, &w_min, &h);
if (w_max < w_min)
{
recmode_icon_max = CRecordManager::RECMODE_TSHIFT;
recmode_icon_min = CRecordManager::RECMODE_REC;
h = w_max;
w_max = w_min;
w_min = h;
}
for (uint32_t i = 0; i < chanlist.size(); i++)
{
rec_mode = CRecordManager::getInstance()->GetRecordMode(chanlist[i]->channel_id);
if (rec_mode == recmode_icon_max)
{
ChannelList_Rec = w_max;
break;
} else if (rec_mode == recmode_icon_min)
ChannelList_Rec = w_min;
}
}
//record check //record check
int rec_mode = CRecordManager::getInstance()->GetRecordMode(chanlist[curr]->channel_id); rec_mode = CRecordManager::getInstance()->GetRecordMode(chanlist[curr]->channel_id);
//set recording icon //set recording icon
const char * rec_icon = ""; const char * rec_icon = "";
@@ -1877,10 +1905,9 @@ void CChannelList::paintItem(int pos)
//calculating icons //calculating icons
int icon_x = (x+width-15-2) - RADIUS_LARGE/2; int icon_x = (x+width-15-2) - RADIUS_LARGE/2;
int r_icon_h=0; int r_icon_w=0; int s_icon_h=0; int s_icon_w=0; int r_icon_w=0; int s_icon_h=0; int s_icon_w=0;
frameBuffer->getIconSize(NEUTRINO_ICON_SCRAMBLED, &s_icon_w, &s_icon_h); frameBuffer->getIconSize(NEUTRINO_ICON_SCRAMBLED, &s_icon_w, &s_icon_h);
if (rec_mode != CRecordManager::RECMODE_OFF) r_icon_w = ChannelList_Rec;
frameBuffer->getIconSize(rec_icon, &r_icon_w, &r_icon_h);
int r_icon_x = icon_x; int r_icon_x = icon_x;
//paint scramble icon //paint scramble icon

View File

@@ -81,6 +81,7 @@ private:
int info_height; int info_height;
bool new_mode_active; bool new_mode_active;
int ChannelList_Rec;
void paintDetails(int index); void paintDetails(int index);
void clearItem2DetailsLine (); void clearItem2DetailsLine ();