Merge branch 'ni/tuxbox' into ni/mp/tuxbox

Origin commit data
------------------
Commit: 98ed3d9448
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-12-19 (Mon, 19 Dec 2016)
This commit is contained in:
vanhofen
2016-12-19 17:23:28 +01:00
17 changed files with 54 additions and 25 deletions

View File

@@ -738,18 +738,21 @@ void CCDraw::paintTrigger()
hide();
}
bool CCDraw::paintBlink(CComponentsTimer* Timer)
{
if (Timer){
Timer->OnTimer.connect(cc_draw_trigger_slot);
return Timer->isRun();
}
return false;
}
bool CCDraw::paintBlink(const int& interval, bool is_nano)
{
if (cc_draw_timer == NULL){
if (cc_draw_timer == NULL)
cc_draw_timer = new CComponentsTimer(interval, is_nano);
if (cc_draw_timer->OnTimer.empty()){
cc_draw_timer->OnTimer.connect(cc_draw_trigger_slot);
}
}
if (cc_draw_timer)
return cc_draw_timer->isRun();
return false;
return paintBlink(cc_draw_timer);
}
bool CCDraw::cancelBlink(bool keep_on_screen)

View File

@@ -312,6 +312,17 @@ class CCDraw : public COSDFader, public CComponentsSignals
///paint item, same like paint(CC_SAVE_SCREEN_YES) but without any argument
virtual void paint1(){paint(CC_SAVE_SCREEN_YES);}
/**paint item with blink effect
* This should work with all cc item types.
*
* @return bool returns true if effect is successful started
*
* @param[in] CComponentsTimer* pointer to timer object, Note: This object must be created and distroy outside
* of this methode.
* @see overloaded version of paintBlink()
*/
virtual bool paintBlink(CComponentsTimer* Timer);
/**paint item with blink effect
* This should work with all cc item types.
*

View File

@@ -97,6 +97,7 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const
cch_font = NULL;
cch_size_mode = CC_HEADER_SIZE_LARGE;
CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CComponentsHeader::resetFont));
shadow = shadow_mode;
col_frame = col_frame_old = color_frame;
@@ -161,6 +162,14 @@ void CComponentsHeader::setCaptionFont(Font* font)
cch_font = font;
}
void CComponentsHeader::resetFont()
{
if (cch_font){
cch_font = NULL;
dprintf(DEBUG_DEBUG, "\033[33m[CComponentsHeader][%s - %d] reset header font \033[0m\n", __func__, __LINE__);
}
}
void CComponentsHeader::initCaptionFont()
{
Font *l_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE];
@@ -168,7 +177,6 @@ void CComponentsHeader::initCaptionFont()
if (cch_font == NULL){
cch_font = (cch_size_mode == CC_HEADER_SIZE_LARGE? l_font : s_font);
//select matching height
if (cch_size_mode == CC_HEADER_SIZE_LARGE)
height = std::max(height, l_font->getHeight());

View File

@@ -68,6 +68,8 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen
fb_pixel_t cch_col_text;
///property: caption font, see also setCaptionFont()
Font* cch_font;
///reset font
void resetFont();
///property: internal y-position for all items
int cch_items_y;