CComponentsForm: try to fix fit items inside forms

Some items had offsets on screen. Was seen eg. in message windows.
This commit is contained in:
2017-04-17 15:04:34 +02:00
parent 5361296ff4
commit 9ac706b86c

View File

@@ -375,6 +375,7 @@ void CComponentsForm::paintCCItems()
if (cc_parent){
this_x = auto_x = cc_xr;
this_y = auto_y = cc_yr;
w_parent_frame = cc_parent->getFrameThickness();
}
//init and handle scrollbar
@@ -482,7 +483,7 @@ void CComponentsForm::paintCCItems()
//Is it too wide or too high, it will be shortened and displayed in the log.
//This should be avoid!
//checkwidth and adapt if required
int right_frm = (cc_parent ? cc_xr : x) + this_w - 2*fr_thickness;
int right_frm = (cc_parent ? cc_xr : x) + this_w/* - 2*fr_thickness*/;
int right_item = cc_item->getRealXPos() + w_item;
int w_diff = right_item - right_frm;
int new_w = w_item - w_diff;