mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CComponentsInfoBox: fix missing calculation of image position with parent
This commit is contained in:
@@ -105,8 +105,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 +119,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);
|
||||
|
Reference in New Issue
Block a user