mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
CComponents: rework position handling
The real position already used here, if item is bound to a parent. (bound or embedded means: added with addCCItem() to a form) This causes no separate calculation in paint methodes of embedded sub items or sub forms and more nested sub forms. CComponentsForm have also some new members - exchangeCCItem() to exchange the order items - setAppendOffset() to set an offset for auto append mode Autoappend is enabled if x or y have value -1 (defined also in CC_APPEND) x=horizontal, y=vertical Is this activated, no separate calculation of incremental offset is required. However items with independent rendered parts, needs a separate calculation. In some subclasses was this necessary.
This commit is contained in:
@@ -74,8 +74,9 @@ CComponentsPIP::~CComponentsPIP()
|
||||
|
||||
void CComponentsPIP::paint(bool do_save_bg)
|
||||
{
|
||||
int pig_x = x+fr_thickness;
|
||||
int pig_y = y+fr_thickness;
|
||||
//NOTE: real values are reqiured, if we paint not bound items or an own render methodes
|
||||
int pig_x = (cc_parent ? cc_xr : x) + fr_thickness;
|
||||
int pig_y = (cc_parent ? cc_yr : y) + fr_thickness;
|
||||
int pig_w = width-2*fr_thickness;
|
||||
int pig_h = height-2*fr_thickness;
|
||||
|
||||
|
Reference in New Issue
Block a user