mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
Merge branch 'pu/fb-setmode' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Origin commit data
------------------
Branch: ni/coolstream
Commit: a3b4e7edc3
Author: gixxpunk <thomas.harfmann@gmail.com>
Date: 2017-05-29 (Mon, 29 May 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1699,13 +1699,15 @@ void CChannelList::showChannelLogo()
|
||||
{
|
||||
if ((*chanlist).empty())
|
||||
return;
|
||||
|
||||
if(g_settings.channellist_show_channellogo){
|
||||
header->setChannelLogo((*chanlist)[selected]->getChannelID(), (*chanlist)[selected]->getName());
|
||||
header->getChannelLogoObject()->hide();
|
||||
header->getChannelLogoObject()->clearSavedScreen();
|
||||
header->getChannelLogoObject()->allowPaint(true);
|
||||
header->getChannelLogoObject()->paint();
|
||||
}
|
||||
else
|
||||
header->setChannelLogo(0, string());
|
||||
}
|
||||
|
||||
#define NUM_LIST_BUTTONS_SORT 9
|
||||
@@ -2176,16 +2178,7 @@ void CChannelList::paintHead()
|
||||
}
|
||||
}
|
||||
|
||||
if(g_settings.channellist_show_channellogo){
|
||||
//ensure to have clean background
|
||||
header->getChannelLogoObject()->hide();
|
||||
header->setChannelLogo((*chanlist)[selected]->getChannelID(), (*chanlist)[selected]->getName());
|
||||
header->getChannelLogoObject()->allowPaint(false);
|
||||
}
|
||||
else
|
||||
header->setChannelLogo(0, string());
|
||||
header->paint(CC_SAVE_SCREEN_NO);
|
||||
showChannelLogo();
|
||||
}
|
||||
|
||||
CComponentsHeader* CChannelList::getHeaderObject()
|
||||
|
@@ -374,15 +374,16 @@ bool CCDraw::clearFbGradientData()
|
||||
for(size_t i =0; i< v_fbdata.size() ;i++) {
|
||||
if (v_fbdata[i].gradient_data){
|
||||
if (v_fbdata[i].gradient_data->gradientBuf){
|
||||
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], clean up gradientBuf \t %p...\033[0m\n", __func__, __LINE__, v_fbdata[i].gradient_data->gradientBuf);
|
||||
free(v_fbdata[i].gradient_data->gradientBuf);
|
||||
v_fbdata[i].gradient_data->gradientBuf = NULL;
|
||||
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], clean up gradientBuf...\033[0m\n", __func__, __LINE__);
|
||||
}
|
||||
if (v_fbdata[i].gradient_data->boxBuf){
|
||||
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], clean up boxBuf \t %p...\033[0m\n", __func__, __LINE__, v_fbdata[i].gradient_data->boxBuf);
|
||||
cs_free_uncached(v_fbdata[i].gradient_data->boxBuf);
|
||||
v_fbdata[i].gradient_data->boxBuf = NULL;
|
||||
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], clean up boxBuf...\033[0m\n", __func__, __LINE__);
|
||||
}
|
||||
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], clean up gradient data \t %p...\033[0m\n", __func__, __LINE__, v_fbdata[i].gradient_data);
|
||||
delete v_fbdata[i].gradient_data;
|
||||
v_fbdata[i].gradient_data = NULL;
|
||||
ret = true;
|
||||
|
@@ -112,7 +112,7 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const
|
||||
cc_item_enabled = enabled;
|
||||
cc_item_selected = selected;
|
||||
fr_thickness = 0; //TODO: parts of the GUI still don't use framed buttons
|
||||
append_x_offset = 6;
|
||||
append_x_offset = OFFSET_INTER;
|
||||
append_y_offset = 0;
|
||||
corner_rad = RADIUS_SMALL;
|
||||
|
||||
@@ -187,6 +187,7 @@ void CComponentsButton::initCaption()
|
||||
}
|
||||
|
||||
//set basic properties
|
||||
int x_offset = (!cc_btn_text_obj || !cc_btn_icon_obj) ? 0 : append_x_offset;
|
||||
int w_frame = fr_thickness;
|
||||
int reduce = 2*w_frame;
|
||||
if (cc_btn_text_obj){
|
||||
@@ -198,7 +199,7 @@ void CComponentsButton::initCaption()
|
||||
if (cc_btn_font == NULL)
|
||||
cc_btn_font = g_Font[SNeutrinoSettings::FONT_TYPE_BUTTON_TEXT];
|
||||
|
||||
int w_cap = min(width - append_x_offset - x_cap - reduce, cc_btn_font->getRenderWidth(cc_btn_text));
|
||||
int w_cap = min(width - x_offset - x_cap - reduce, cc_btn_font->getRenderWidth(cc_btn_text));
|
||||
int h_cap = min(height - reduce, cc_btn_font->getHeight());
|
||||
/*NOTE:
|
||||
paint of centered text in y direction without y_offset
|
||||
@@ -235,10 +236,10 @@ void CComponentsButton::initCaption()
|
||||
}
|
||||
|
||||
//handle common position of icon and text inside container required for alignment
|
||||
int w_required = w_frame + append_x_offset;
|
||||
w_required += cc_btn_icon_obj ? cc_btn_icon_obj->getWidth() + append_x_offset : 0;
|
||||
int w_required = w_frame + x_offset;
|
||||
w_required += cc_btn_icon_obj ? cc_btn_icon_obj->getWidth() + x_offset : 0;
|
||||
w_required += cc_btn_font ? cc_btn_font->getRenderWidth(cc_btn_text) : 0;
|
||||
w_required += append_x_offset + w_frame;
|
||||
w_required += x_offset + w_frame;
|
||||
|
||||
//dynamic width
|
||||
if (w_required > width){
|
||||
@@ -247,10 +248,10 @@ void CComponentsButton::initCaption()
|
||||
}
|
||||
|
||||
//do center
|
||||
int x_icon = width/2 - w_required/2 /*+ fr_thickness + append_x_offset*/;
|
||||
int x_icon = width/2 - w_required/2 /*+ fr_thickness + x_offset*/;
|
||||
int w_icon = 0;
|
||||
if (cc_btn_icon_obj){
|
||||
x_icon += w_frame + append_x_offset;
|
||||
x_icon += w_frame + x_offset;
|
||||
cc_btn_icon_obj->setXPos(x_icon);
|
||||
w_icon = cc_btn_icon_obj->getWidth();
|
||||
/*in case of dynamic changed height of caption or button opbject itself,
|
||||
@@ -260,7 +261,7 @@ void CComponentsButton::initCaption()
|
||||
cc_btn_icon_obj->setYPos(y_icon);
|
||||
}
|
||||
if (cc_btn_text_obj){
|
||||
cc_btn_text_obj->setXPos(x_icon + w_icon + append_x_offset);
|
||||
cc_btn_text_obj->setXPos(x_icon + w_icon + x_offset);
|
||||
cc_btn_text_obj->setWidth(width - cc_btn_text_obj->getXPos());
|
||||
}
|
||||
}
|
||||
|
@@ -325,12 +325,14 @@ bool CComponentsFrmClock::startClock()
|
||||
if (cl_timer == NULL){
|
||||
cl_timer = new CComponentsTimer(0);
|
||||
cl_timer->setThreadName("frmClock");
|
||||
}
|
||||
|
||||
if (cl_timer->OnTimer.empty()){
|
||||
dprintf(DEBUG_INFO,"\033[33m[CComponentsFrmClock]\t[%s] init slot...\033[0m\n", __func__);
|
||||
cl_timer->OnTimer.connect(cl_sl_show);
|
||||
force_paint_bg = true;
|
||||
}
|
||||
}
|
||||
|
||||
cl_timer->setTimerInterval(cl_interval);
|
||||
|
||||
if (cl_timer->startTimer())
|
||||
@@ -390,7 +392,7 @@ void CComponentsFrmClock::paint(bool do_save_bg)
|
||||
|
||||
void CComponentsFrmClock::setClockFont(Font *font, const int& style)
|
||||
{
|
||||
if (cl_font != font || (cl_font != font)){
|
||||
if (cl_font != font || cl_font_style != style){
|
||||
if (cl_font != font)
|
||||
cl_font = font;
|
||||
if (style != -1)
|
||||
|
@@ -232,8 +232,10 @@ void CComponentsHeader::initIcon()
|
||||
//init cch_icon_obj only if an icon available
|
||||
if (cch_icon_name.empty()) {
|
||||
cch_icon_w = 0;
|
||||
if (cch_icon_obj)
|
||||
if (cch_icon_obj){
|
||||
removeCCItem(cch_icon_obj);
|
||||
cch_icon_obj = NULL;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -143,6 +143,7 @@ bool CComponentsTimer::startTimer()
|
||||
bool CComponentsTimer::stopTimer()
|
||||
{
|
||||
tm_enable = false;
|
||||
OnTimer.clear();
|
||||
stopThread();
|
||||
if(tm_thread == 0)
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user