mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CComponentsFrmChain: add possibility to use individual positions for items
This commit is contained in:
@@ -94,16 +94,19 @@ void CComponentsFrmChain::initChainItems()
|
||||
h_tmp = append_y_offset;
|
||||
|
||||
for (size_t i= 0; i< v_cc_items.size(); i++){
|
||||
int x_item = v_cc_items[i]->getXPos();
|
||||
int y_item = v_cc_items[i]->getYPos();
|
||||
|
||||
if (chn_direction & CC_DIR_X){
|
||||
w_tmp += v_cc_items[i]->getWidth();
|
||||
w_tmp += append_x_offset;
|
||||
v_cc_items[i]->setPos(CC_APPEND, CC_CENTERED);
|
||||
v_cc_items[i]->setPos(max(CC_APPEND, x_item), max(CC_CENTERED, y_item));
|
||||
}
|
||||
|
||||
if (chn_direction & CC_DIR_Y){
|
||||
h_tmp += v_cc_items[i]->getHeight();
|
||||
h_tmp += append_y_offset;
|
||||
v_cc_items[i]->setPos(CC_CENTERED, CC_APPEND);
|
||||
v_cc_items[i]->setPos(max(CC_CENTERED, x_item), max(CC_APPEND, y_item));
|
||||
}
|
||||
}
|
||||
width = max (w_tmp, width);
|
||||
|
@@ -70,7 +70,7 @@ class CComponentsFrmChain : public CComponentsForm
|
||||
fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6,
|
||||
fb_pixel_t& color_body = COL_MENUHEAD_PLUS_0,
|
||||
fb_pixel_t& color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
||||
// ~CComponentsSlider(); //inherited from CComponentsForm
|
||||
// ~CComponentsFrmChain(); //inherited from CComponentsForm
|
||||
|
||||
///defines mode for arrangement direction of items, see also chn_direction
|
||||
virtual void setDirection(int direction);
|
||||
|
Reference in New Issue
Block a user