mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
cc_frm: fix paintCCItems() y position calculation
This commit is contained in:
@@ -432,6 +432,13 @@ void CComponentsForm::paintCCItems()
|
|||||||
//get current dimension of item
|
//get current dimension of item
|
||||||
int w_item = cc_item->getWidth() - (xpos <= fr_thickness ? fr_thickness : 0);
|
int w_item = cc_item->getWidth() - (xpos <= fr_thickness ? fr_thickness : 0);
|
||||||
int h_item = cc_item->getHeight() - (ypos <= fr_thickness ? fr_thickness : 0);
|
int h_item = cc_item->getHeight() - (ypos <= fr_thickness ? fr_thickness : 0);
|
||||||
|
/* this happens for example with opkg manager's "package info" screen on a SD framebuffer (704x576)
|
||||||
|
* later CC_CENTERED auto_y calculation is wrong then */
|
||||||
|
if (cc_item->getHeight() > height) {
|
||||||
|
cc_item->setHeight(height);
|
||||||
|
// TODO: the fr_thickness is probably wrong for ypos < 0 (CC_CENTERED / CC_APPEND)
|
||||||
|
h_item = cc_item->getHeight() - (ypos <= fr_thickness ? fr_thickness : 0);
|
||||||
|
}
|
||||||
|
|
||||||
//check item for corrupt position, skip current item if found problems
|
//check item for corrupt position, skip current item if found problems
|
||||||
if (ypos > height || xpos > this_w){
|
if (ypos > height || xpos > this_w){
|
||||||
@@ -468,6 +475,7 @@ void CComponentsForm::paintCCItems()
|
|||||||
//append hor
|
//append hor
|
||||||
if (ypos == CC_APPEND){
|
if (ypos == CC_APPEND){
|
||||||
auto_y += append_y_offset;
|
auto_y += append_y_offset;
|
||||||
|
// FIXME: ypos is probably wrong here, because it is -1
|
||||||
cc_item->setRealYPos(auto_y + ypos + w_parent_frame);
|
cc_item->setRealYPos(auto_y + ypos + w_parent_frame);
|
||||||
auto_y += h_item;
|
auto_y += h_item;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user