From 5380b1bacb67c2c5d6ceea14c23b7cd2159c1dc8 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 16 Jun 2013 00:22:44 +0200 Subject: [PATCH] CComponentsText: fix position handling in sub forms Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/940576f0a07b2b965af761f0f371720614802252 Author: Thilo Graf Date: 2013-06-16 (Sun, 16 Jun 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_item_text.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_item_text.cpp b/src/gui/components/cc_item_text.cpp index 2f8fd3234..d93836488 100644 --- a/src/gui/components/cc_item_text.cpp +++ b/src/gui/components/cc_item_text.cpp @@ -67,6 +67,8 @@ CComponentsText::CComponentsText( const int x_pos, const int y_pos, const int w, ct_text = text; ct_text_mode = mode; ct_col_text = color_text; + + initCCText(); } @@ -121,9 +123,16 @@ void CComponentsText::initCCText() delete ct_box; ct_box = NULL; } + + //using of real x/y values to paint images if this text object is bound in a parent form + int tx = x, ty = y; + if (cc_parent){ + tx = cc_xr; + ty = cc_yr; + } ct_box = new CBox(); - ct_box->iX = x+fr_thickness; - ct_box->iY = y+fr_thickness; + ct_box->iX = tx+fr_thickness; + ct_box->iY = ty+fr_thickness; ct_box->iWidth = width-2*fr_thickness; ct_box->iHeight = height-2*fr_thickness;