mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
Merge remote-tracking branch 'tuxbox/master'
This commit is contained in:
1
src/gui/components/.gitignore
vendored
Normal file
1
src/gui/components/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/doc/html
|
2457
src/gui/components/Doxyfile
Normal file
2457
src/gui/components/Doxyfile
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
|
@@ -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++){
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user