mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-06 13:18:27 +02:00
Merge branch 'ni/tuxbox' into ni/mp/tuxbox
Origin commit data
------------------
Commit: 2733e0f260
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-01-02 (Mon, 02 Jan 2017)
This commit is contained in:
@@ -96,6 +96,7 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const
|
||||
height = height_old = h;
|
||||
|
||||
cch_font = NULL;
|
||||
initDefaultFonts();
|
||||
cch_size_mode = CC_HEADER_SIZE_LARGE;
|
||||
CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CComponentsHeader::resetFont));
|
||||
|
||||
@@ -165,16 +166,20 @@ void CComponentsHeader::setCaptionFont(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__);
|
||||
cch_font = NULL;
|
||||
}
|
||||
initDefaultFonts();
|
||||
}
|
||||
|
||||
void CComponentsHeader::initDefaultFonts()
|
||||
{
|
||||
l_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE];
|
||||
s_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU];
|
||||
}
|
||||
|
||||
void CComponentsHeader::initCaptionFont()
|
||||
{
|
||||
Font *l_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE];
|
||||
Font *s_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU];
|
||||
|
||||
if (cch_font == NULL){
|
||||
cch_font = (cch_size_mode == CC_HEADER_SIZE_LARGE? l_font : s_font);
|
||||
//select matching height
|
||||
@@ -231,11 +236,10 @@ void CComponentsHeader::initIcon()
|
||||
cch_icon_obj->doPaintBg(false);
|
||||
|
||||
//set corner mode of icon item
|
||||
int cc_icon_corner_type = corner_type;
|
||||
int cc_icon_corner_type = CORNER_LEFT;
|
||||
if (corner_type == CORNER_TOP_LEFT || corner_type == CORNER_TOP)
|
||||
cc_icon_corner_type = CORNER_TOP_LEFT;
|
||||
else
|
||||
cc_icon_corner_type = CORNER_LEFT;
|
||||
|
||||
cch_icon_obj->setCorner(corner_rad-fr_thickness, cc_icon_corner_type);
|
||||
|
||||
//global set width of icon object
|
||||
@@ -335,11 +339,10 @@ void CComponentsHeader::initButtons()
|
||||
cch_btn_obj->addIcon(v_cch_btn);
|
||||
|
||||
//set corner mode of button item
|
||||
int cc_btn_corner_type = corner_type;
|
||||
int cc_btn_corner_type = CORNER_RIGHT;
|
||||
if (corner_type == CORNER_TOP_RIGHT || corner_type == CORNER_TOP)
|
||||
cc_btn_corner_type = CORNER_TOP_RIGHT;
|
||||
else
|
||||
cc_btn_corner_type = CORNER_RIGHT;
|
||||
|
||||
cch_btn_obj->setCorner(corner_rad-fr_thickness, cc_btn_corner_type);
|
||||
|
||||
//global adapt height
|
||||
@@ -412,11 +415,10 @@ void CComponentsHeader::initClock()
|
||||
cch_cl_obj->setClockFormat(cch_cl_format, cch_cl_sec_format);
|
||||
|
||||
//set corner mode of button item
|
||||
int cc_btn_corner_type = corner_type;
|
||||
int cc_btn_corner_type = CORNER_RIGHT;
|
||||
if (corner_type == CORNER_TOP_RIGHT || corner_type == CORNER_TOP)
|
||||
cc_btn_corner_type = CORNER_TOP_RIGHT;
|
||||
else
|
||||
cc_btn_corner_type = CORNER_RIGHT;
|
||||
|
||||
cch_cl_obj->setCorner(corner_rad-fr_thickness, cc_btn_corner_type);
|
||||
|
||||
//global adapt height
|
||||
|
Reference in New Issue
Block a user