From 6ba757bd9d669e8db6ce6fecbaa5cca69352240d Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 4 May 2014 01:47:43 +0200 Subject: [PATCH] CComponentsItem: don't increase x/y position if frame width already defined --- src/gui/components/cc_item.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 5819ad774..1db1cb436 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -82,8 +82,9 @@ void CComponentsItem::paintInit(bool do_save_bg) //if item is bound on a parent form, we must use real x/y values and from parent form as reference int ix = x, iy = y; if (cc_parent){ - ix = cc_xr + cc_parent->getFrameThickness(); - iy = cc_yr + cc_parent->getFrameThickness(); + int w_parent_frame = cc_parent->getFrameThickness(); + ix = cc_xr + (x < w_parent_frame ? w_parent_frame : 0); + iy = cc_yr + (y < w_parent_frame ? w_parent_frame : 0); } comp_fbdata_t fbdata[] =