mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
CComponentsItem/Form: add var for real item position
If items are used in forms it can be usefully to have a variable
which contains the real position on screen.
This can happen e.g. if an item contains separate render methods, because within forms
usual x/y values related to form dimensions and be converted.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 62efe2cb59
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-04-10 (Wed, 10 Apr 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -233,7 +233,6 @@ void CComponentsForm::paintCCItems()
|
||||
//cache original item position and dimensions
|
||||
int x_item, y_item, w_item, h_item;
|
||||
v_cc_items[i]->getDimensions(&x_item, &y_item, &w_item, &h_item);
|
||||
|
||||
|
||||
int xy_ref = 0+fr_thickness; //allowed minimal x and y start position
|
||||
if (x_item < xy_ref){
|
||||
@@ -270,6 +269,11 @@ void CComponentsForm::paintCCItems()
|
||||
printf("[CComponentsForm] %s: item %d too large, definied height=%d, possible height=%d \n", __FUNCTION__, i, h_item, v_cc_items[i]->getHeight());
|
||||
#endif
|
||||
}
|
||||
|
||||
//set real position dimension to item
|
||||
int real_x = v_cc_items[i]->getXPos();
|
||||
int real_y = v_cc_items[i]->getYPos();
|
||||
v_cc_items[i]->setRealPos(real_x, real_y);
|
||||
|
||||
//paint element without saved screen!
|
||||
v_cc_items[i]->paint(CC_SAVE_SCREEN_NO);
|
||||
|
Reference in New Issue
Block a user