mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
- eventlist: move info button from header to buttonbar
* remove unused button_label structs Conflicts: src/gui/eventlist.cpp
This commit is contained in:
@@ -790,15 +790,13 @@ void CNeutrinoEventList::paintItem(unsigned int pos, t_channel_id channel_idI)
|
||||
void CNeutrinoEventList::paintHead(std::string _channelname, std::string _channelname_prev, std::string _channelname_next)
|
||||
{
|
||||
const short font_h = 8;
|
||||
int iw = 0, ih = 0;
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_INFO, &iw, &ih);
|
||||
frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
|
||||
int name_width =((width-8-iw)/3);
|
||||
int name_width = width/3 ;
|
||||
|
||||
short prev_len = g_Font[font_h]->getRenderWidth(_channelname_prev.c_str(),true);
|
||||
short next_len = g_Font[font_h]->getRenderWidth(_channelname_next.c_str(),true);
|
||||
short middle_len = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->getRenderWidth(_channelname.c_str(),true);
|
||||
short middle_offset = (width- next_len- prev_len- middle_len-iw-8)/2;
|
||||
short middle_offset = (width- next_len- prev_len- middle_len)/2;
|
||||
if(middle_offset < 0){
|
||||
int fw_h = g_Font[font_h]->getWidth();
|
||||
int newsize = abs(middle_offset / fw_h) + 1;
|
||||
@@ -838,13 +836,6 @@ void CNeutrinoEventList::paint(t_channel_id channel_id)
|
||||
{
|
||||
liststart = (selected/listmaxshow)*listmaxshow;
|
||||
|
||||
int iw = 0, ih = 0;
|
||||
if (evtlist[0].eventID != 0) {
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_INFO, &iw, &ih);
|
||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_INFO, x+ width - 4 - iw, y, theight);
|
||||
}
|
||||
|
||||
|
||||
for(unsigned int count=0;count<listmaxshow;count++)
|
||||
{
|
||||
paintItem(count, channel_id);
|
||||
@@ -862,31 +853,6 @@ void CNeutrinoEventList::paint(t_channel_id channel_id)
|
||||
|
||||
}
|
||||
|
||||
|
||||
#define NUM_EVENTLIST_FIRST_BUTTON 1
|
||||
struct button_label EventListFirstButton[NUM_EVENTLIST_FIRST_BUTTON] =
|
||||
{
|
||||
{ "", LOCALE_EVENTLISTBAR_RECORDEVENT } // record button
|
||||
};
|
||||
|
||||
#define NUM_EVENTLIST_SECOND_BUTTON 1
|
||||
struct button_label EventListSecondButton[NUM_EVENTLIST_SECOND_BUTTON] =
|
||||
{
|
||||
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_EVENTFINDER_SEARCH } // search button
|
||||
};
|
||||
|
||||
#define NUM_EVENTLIST_THIRD_BUTTON 1
|
||||
struct button_label EventListThirdButton[NUM_EVENTLIST_THIRD_BUTTON] =
|
||||
{
|
||||
{ "", LOCALE_EVENTLISTBAR_CHANNELSWITCH } // timer event channel switch button
|
||||
};
|
||||
|
||||
#define NUM_EVENTLIST_FOURTH_BUTTON 1
|
||||
struct button_label EventListFourthButton[NUM_EVENTLIST_FOURTH_BUTTON] =
|
||||
{
|
||||
{ "", LOCALE_EVENTLISTBAR_EVENTSORT } // sort event button
|
||||
};
|
||||
|
||||
void CNeutrinoEventList::showFunctionBar (bool show, t_channel_id channel_id)
|
||||
{
|
||||
int border_space = 4;
|
||||
@@ -898,7 +864,7 @@ void CNeutrinoEventList::showFunctionBar (bool show, t_channel_id channel_id)
|
||||
CColorKeyHelper keyhelper; //user_menue.h
|
||||
neutrino_msg_t dummy = CRCInput::RC_nokey;
|
||||
const char * icon = NULL;
|
||||
struct button_label buttons[4];
|
||||
struct button_label buttons[5];
|
||||
int btn_cnt = 0;
|
||||
|
||||
bh = std::max(FunctionBarHeight, bh);
|
||||
@@ -958,6 +924,14 @@ void CNeutrinoEventList::showFunctionBar (bool show, t_channel_id channel_id)
|
||||
btn_cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
// info button
|
||||
if (evtlist[0].eventID != 0) {
|
||||
buttons[btn_cnt].button = NEUTRINO_ICON_BUTTON_INFO_SMALL;
|
||||
buttons[btn_cnt].locale = LOCALE_EPGMENU_EVENTINFO;
|
||||
btn_cnt++;
|
||||
}
|
||||
|
||||
FunctionBarHeight = std::max(::paintButtons(bx, by, bw, btn_cnt, buttons, bw), FunctionBarHeight);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user