Merge /home/svenhoefer/cst-public-gui-neutrino into ni/cst-next

Conflicts:
	src/driver/framebuffer.cpp


Origin commit data
------------------
Branch: ni/coolstream
Commit: c0e452856a
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-13 (Thu, 13 Oct 2016)



------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-10-13 09:42:27 +02:00
4 changed files with 21 additions and 28 deletions

View File

@@ -825,7 +825,7 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int
return; return;
if (dx == 0 || dy == 0) { if (dx == 0 || dy == 0) {
//NI dprintf(DEBUG_NORMAL, "[CFrameBuffer] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __func__, __LINE__, radius, x, y, x+dx, y+dy); dprintf(DEBUG_DEBUG, "[CFrameBuffer] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __func__, __LINE__, radius, x, y, x+dx, y+dy);
return; return;
} }
if (radius < 0) if (radius < 0)

View File

@@ -111,6 +111,7 @@ void CComponentsScrollBar::initTopNaviIcon()
//initialize icon object //initialize icon object
if (sb_up_obj == NULL){ if (sb_up_obj == NULL){
sb_up_obj = new CComponentsPicture(CC_CENTERED, fr_thickness, sb_up_icon, this); sb_up_obj = new CComponentsPicture(CC_CENTERED, fr_thickness, sb_up_icon, this);
sb_up_obj->SetTransparent(CFrameBuffer::TM_BLACK);
sb_up_obj->doPaintBg(false); sb_up_obj->doPaintBg(false);
} }
sb_up_obj->setWidth(width-2*fr_thickness); sb_up_obj->setWidth(width-2*fr_thickness);
@@ -121,6 +122,7 @@ void CComponentsScrollBar::initBottomNaviIcon()
//initialize icon object //initialize icon object
if (sb_down_obj == NULL){ if (sb_down_obj == NULL){
sb_down_obj = new CComponentsPicture(CC_CENTERED, CC_APPEND, sb_down_icon, this); sb_down_obj = new CComponentsPicture(CC_CENTERED, CC_APPEND, sb_down_icon, this);
sb_down_obj->SetTransparent(CFrameBuffer::TM_BLACK);
sb_down_obj->doPaintBg(false); sb_down_obj->doPaintBg(false);
} }
sb_down_obj->setWidth(width-2*fr_thickness); sb_down_obj->setWidth(width-2*fr_thickness);
@@ -165,13 +167,17 @@ void CComponentsScrollBar::initSegments()
//set color for marked id //set color for marked id
if (sb_mark_id == id){ if (sb_mark_id == id){
item->setColorBody(COL_MENUCONTENTSELECTED_PLUS_0); item->setColorBody(COL_SCROLLBAR_ACTIVE);
#if 0
item->enableColBodyGradient(CC_COLGRAD_COL_A_2_COL_B); item->enableColBodyGradient(CC_COLGRAD_COL_A_2_COL_B);
item->setColBodyGradient(CColorGradient::gradientDark2Light2Dark, CFrameBuffer::gradientHorizontal); item->setColBodyGradient(CColorGradient::gradientDark2Light2Dark, CFrameBuffer::gradientHorizontal);
#endif
} }
else{ else{
item->setColorBody(COL_SCROLLBAR_PASSIVE_PLUS_0); item->setColorBody(COL_SCROLLBAR_PASSIVE);
#if 0
item->disableColBodyGradient(); item->disableColBodyGradient();
#endif
} }
} }

View File

@@ -331,7 +331,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
bool dont_hide = false; bool dont_hide = false;
paintHead(channel_id, channelname, channelname_prev, channelname_next); paintHead(channel_id, channelname, channelname_prev, channelname_next);
paint(channel_id); paint(channel_id);
showFunctionBar(true, channel_id); showFunctionBar(channel_id);
int oldselected = selected; int oldselected = selected;
@@ -363,14 +363,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
if (msg == CRCInput::RC_up || (int) msg == g_settings.key_pageup || if (msg == CRCInput::RC_up || (int) msg == g_settings.key_pageup ||
msg == CRCInput::RC_down || (int) msg == g_settings.key_pagedown) msg == CRCInput::RC_down || (int) msg == g_settings.key_pagedown)
{ {
bool paint_buttonbar = false; //function bar
int prev_selected = selected; int prev_selected = selected;
// TODO: do we need this at all? Search button is always painted IIUC...
if ((g_settings.key_channelList_addremind != (int)CRCInput::RC_nokey) ||
(g_settings.key_channelList_sort != (int)CRCInput::RC_nokey) ||
((g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) &&
(g_settings.key_channelList_addrecord != (int)CRCInput::RC_nokey)))
paint_buttonbar = true;
int new_sel = UpDownKey(evtlist, msg, listmaxshow, selected); int new_sel = UpDownKey(evtlist, msg, listmaxshow, selected);
if (new_sel >= 0) { if (new_sel >= 0) {
selected = new_sel; selected = new_sel;
@@ -385,7 +378,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
else else
paintItem(selected - liststart, channel_id); paintItem(selected - liststart, channel_id);
showFunctionBar(paint_buttonbar, channel_id); showFunctionBar(channel_id);
} }
//sort //sort
else if (!showfollow && (msg == (neutrino_msg_t)g_settings.key_channelList_sort)) else if (!showfollow && (msg == (neutrino_msg_t)g_settings.key_channelList_sort))
@@ -443,7 +436,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
timerlist.clear(); timerlist.clear();
g_Timerd->getTimerList (timerlist); g_Timerd->getTimerList (timerlist);
paint(evtlist[selected].channelID); paint(evtlist[selected].channelID);
showFunctionBar(true, evtlist[selected].channelID); showFunctionBar(evtlist[selected].channelID);
continue; continue;
} }
std::string recDir = g_settings.network_nfs_recordingdir; std::string recDir = g_settings.network_nfs_recordingdir;
@@ -498,7 +491,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
timerlist.clear(); timerlist.clear();
g_Timerd->getTimerList (timerlist); g_Timerd->getTimerList (timerlist);
paint(used_id); paint(used_id);
showFunctionBar(true, used_id); showFunctionBar(used_id);
} }
} }
else if ( msg == (neutrino_msg_t) g_settings.key_channelList_addremind )//add/remove zapto timer event else if ( msg == (neutrino_msg_t) g_settings.key_channelList_addremind )//add/remove zapto timer event
@@ -510,7 +503,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
timerlist.clear(); timerlist.clear();
g_Timerd->getTimerList (timerlist); g_Timerd->getTimerList (timerlist);
paint(evtlist[selected].channelID); paint(evtlist[selected].channelID);
showFunctionBar(true, evtlist[selected].channelID); showFunctionBar(evtlist[selected].channelID);
continue; continue;
} }
@@ -522,7 +515,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
timerlist.clear(); timerlist.clear();
g_Timerd->getTimerList (timerlist); g_Timerd->getTimerList (timerlist);
paint(evtlist[selected].channelID ); paint(evtlist[selected].channelID );
showFunctionBar(true, evtlist[selected].channelID ); showFunctionBar(evtlist[selected].channelID );
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]);
} }
else if (msg == (neutrino_msg_t)g_settings.key_channelList_cancel) else if (msg == (neutrino_msg_t)g_settings.key_channelList_cancel)
@@ -533,7 +526,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
paintHead(channel_id, channelname); paintHead(channel_id, channelname);
readEvents(epg_id); readEvents(epg_id);
paint(channel_id); paint(channel_id);
showFunctionBar(true, channel_id); showFunctionBar(channel_id);
} else { } else {
selected = oldselected; selected = oldselected;
if(fader.StartFadeOut()) { if(fader.StartFadeOut()) {
@@ -596,7 +589,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
oldEventID = -1; oldEventID = -1;
bgRightBoxPaint = false; bgRightBoxPaint = false;
paint(channel_id); paint(channel_id);
showFunctionBar(true, channel_id); showFunctionBar(channel_id);
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]);
} }
else if (msg == CRCInput::RC_epg) else if (msg == CRCInput::RC_epg)
@@ -639,7 +632,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
oldEventID = -1; oldEventID = -1;
bgRightBoxPaint = false; bgRightBoxPaint = false;
paint(channel_id); paint(channel_id);
showFunctionBar(true, channel_id); showFunctionBar(channel_id);
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]);
} }
} }
@@ -953,19 +946,13 @@ void CEventList::paint(t_channel_id channel_id)
} }
void CEventList::showFunctionBar (bool show, t_channel_id channel_id) void CEventList::showFunctionBar(t_channel_id channel_id)
{ {
int bx = x; int bx = x;
int bw = full_width; int bw = full_width;
int bh = iheight; int bh = iheight;
int by = y + height - bh; int by = y + height - bh;
if (! show) {
// -- hide only?
frameBuffer->paintBackgroundBoxRel(bx,by,bw,bh);
return;
}
CColorKeyHelper keyhelper; //user_menue.h CColorKeyHelper keyhelper; //user_menue.h
neutrino_msg_t dummy = CRCInput::RC_nokey; neutrino_msg_t dummy = CRCInput::RC_nokey;
const char * icon = NULL; const char * icon = NULL;
@@ -1180,7 +1167,7 @@ bool CEventList::findEvents(t_channel_id channel_id, std::string channelname)
else else
paintHead(channel_id, channelname); paintHead(channel_id, channelname);
paint(); paint();
showFunctionBar(true, channel_id); showFunctionBar(channel_id);
return(res); return(res);
} }

View File

@@ -114,7 +114,7 @@ class CEventList : public CListHelpers
void paint(t_channel_id channel_id = 0); void paint(t_channel_id channel_id = 0);
void paintHead(t_channel_id _channel_id, std::string _channelname, std::string _channelname_prev = "", std::string _channelname_next = ""); void paintHead(t_channel_id _channel_id, std::string _channelname, std::string _channelname_prev = "", std::string _channelname_next = "");
void hide(); void hide();
void showFunctionBar(bool show, t_channel_id channel_id); void showFunctionBar(t_channel_id channel_id);
int timerPre; int timerPre;
int timerPost; int timerPost;