Merge remote-tracking branch 'tuxbox/master'

This commit is contained in:
Stefan Seyfried
2016-11-12 18:06:26 +01:00
58 changed files with 6498 additions and 735 deletions

1
src/gui/components/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/doc/html

2457
src/gui/components/Doxyfile Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -121,7 +121,7 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const
cch_col_text = COL_MENUHEAD_TEXT;
cch_caption_align = CTextBox::NO_AUTO_LINEBREAK;
cch_items_y = CC_CENTERED;
cch_offset = 8;
cch_offset = OFFSET_INNER_MID;
cch_icon_x = cch_offset;
cch_icon_w = 0;
cch_clock_w = 0;

View File

@@ -136,6 +136,8 @@ void CComponentsScrollBar::initSegments()
//calculate height of segment container
int h_seg_obj = height - 2*sb_up_obj->getHeight() - 3*append_y_offset;
if(h_seg_obj < 0)
h_seg_obj = 0;
//init segment container
if (sb_segments_obj == NULL){
@@ -154,6 +156,8 @@ void CComponentsScrollBar::initSegments()
//set y position of 1st segment and set height of segments
int y_seg = 1+ append_y_offset;
int h_seg = sb_segments_obj->getHeight()/sb_segments_count - append_y_offset;
if(h_seg < 0)
h_seg = 0;
//create and add segments to segment container
for(u_int8_t i=0; i<sb_segments_count; i++){

View File

@@ -83,6 +83,11 @@ CComponentsInfoBox::~CComponentsInfoBox()
void CComponentsInfoBox::setPicture(const std::string& picture_name)
{
pic_name = picture_name;
if (!pic_name.empty()){
int w, h;
frameBuffer->getIconSize(pic_name.c_str(), &w, &h);
height = max(h, height);
}
}
void CComponentsInfoBox::setPicture(const char* picture_name)
@@ -105,8 +110,12 @@ void CComponentsInfoBox::paintPicture()
if (pic_name.empty())
return;
//NOTE: real values are reqiured, if we paint this item within a form as embedded cc-item
int x_pic = (cc_parent ? cc_xr : x) + fr_thickness;
int y_pic = (cc_parent ? cc_yr : y) + fr_thickness;
//init pic object and set icon paint position
pic = new CComponentsPicture(x+fr_thickness+x_offset, y+fr_thickness, 0, min(48, height-2*fr_thickness), pic_name); //NOTE: icons do not scale!
pic = new CComponentsPicture(x_pic+x_offset, y_pic, 0, min(48, height-2*fr_thickness), pic_name); //NOTE: icons do not scale!
pic->setColorBody(col_body);
@@ -115,7 +124,7 @@ void CComponentsInfoBox::paintPicture()
pic->doPaintBg(false);
//fit icon into frame
pic->setYPos(y+(height/2-pic->getHeight()/2));
pic->setYPos(y_pic+(height/2-pic->getHeight()/2));
//paint, but set visibility mode
pic->allowPaint(cc_allow_paint);

View File

@@ -224,7 +224,7 @@ void CComponentsPicture::initCCItem()
width = GetWidth4FB_HW_ACC(x+fr_thickness, width-2*fr_thickness)+2*fr_thickness;
#endif
}
if (keep_dy_aspect & dx){
if (keep_dy_aspect && dx){
float w_ratio = float(width)*100/(float)dx;
height = int(w_ratio*(float)dy/100);
}