mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
cc_frm: fix offset in center mode
Items were not precise centered.
Origin commit data
------------------
Commit: 121efbebd4
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-01-23 (Thu, 23 Jan 2020)
This commit is contained in:
@@ -504,8 +504,8 @@ void CComponentsForm::paintCCItems()
|
|||||||
}
|
}
|
||||||
//positionize vertical centered
|
//positionize vertical centered
|
||||||
else if (xpos == CC_CENTERED){
|
else if (xpos == CC_CENTERED){
|
||||||
auto_x = this_w/2 - w_item/2;
|
auto_x = this_w/2 - w_item/2 - w_parent_frame/2;
|
||||||
v_cc_items.at(i)->setRealXPos(this_x + auto_x + w_parent_frame);
|
v_cc_items.at(i)->setRealXPos(this_x + auto_x);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
v_cc_items.at(i)->setRealXPos(this_x + xpos + w_parent_frame);
|
v_cc_items.at(i)->setRealXPos(this_x + xpos + w_parent_frame);
|
||||||
@@ -525,8 +525,8 @@ void CComponentsForm::paintCCItems()
|
|||||||
}
|
}
|
||||||
//positionize hor centered
|
//positionize hor centered
|
||||||
else if (ypos == CC_CENTERED){
|
else if (ypos == CC_CENTERED){
|
||||||
auto_y = height/2 - h_item/2;
|
auto_y = height/2 - h_item/2 - w_parent_frame/2;
|
||||||
v_cc_items.at(i)->setRealYPos(this_y + auto_y + w_parent_frame);
|
v_cc_items.at(i)->setRealYPos(this_y + auto_y);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
v_cc_items.at(i)->setRealYPos(this_y + ypos + w_parent_frame);
|
v_cc_items.at(i)->setRealYPos(this_y + ypos + w_parent_frame);
|
||||||
|
Reference in New Issue
Block a user