CComponentsForm/CComponentsHeader: use start pos x=1 instead 0

0 could make problems on fit items into container


Origin commit data
------------------
Branch: ni/coolstream
Commit: ad80daea96
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-12-04 (Wed, 04 Dec 2013)



------------------
This commit was generated by Migit
This commit is contained in:
2013-12-04 22:01:24 +01:00
parent 93604aee15
commit f8a4007a23
2 changed files with 5 additions and 5 deletions

View File

@@ -301,7 +301,7 @@ void CComponentsForm::paintCCItems()
//append vertical //append vertical
if (xpos == CC_APPEND){ if (xpos == CC_APPEND){
auto_x += append_h_offset; auto_x += append_h_offset;
cc_item->setRealXPos(auto_x + xpos + 1); cc_item->setRealXPos(auto_x + xpos);
auto_x += w_item; auto_x += w_item;
} }
//positionize vertical centered //positionize vertical centered
@@ -318,7 +318,7 @@ void CComponentsForm::paintCCItems()
//append hor //append hor
if (ypos == CC_APPEND){ if (ypos == CC_APPEND){
auto_y += append_v_offset; auto_y += append_v_offset;
cc_item->setRealYPos(auto_y + ypos + 1); cc_item->setRealYPos(auto_y + ypos);
auto_y += h_item; auto_y += h_item;
} }
//positionize hor centered //positionize hor centered
@@ -336,7 +336,7 @@ void CComponentsForm::paintCCItems()
//Is it too wide or too high, it will be shortened and displayed in the log. //Is it too wide or too high, it will be shortened and displayed in the log.
//This should be avoid! //This should be avoid!
//checkwidth and adapt if required //checkwidth and adapt if required
int right_frm = (cc_parent ? cc_xr : x) + width - fr_thickness; int right_frm = (cc_parent ? cc_xr : x) + width - 2*fr_thickness;
int right_item = cc_item->getRealXPos() + w_item; int right_item = cc_item->getRealXPos() + w_item;
int w_diff = right_item - right_frm; int w_diff = right_item - right_frm;
int new_w = w_item - w_diff; int new_w = w_item - w_diff;
@@ -347,7 +347,7 @@ void CComponentsForm::paintCCItems()
} }
//check height and adapt if required //check height and adapt if required
int bottom_frm = (cc_parent ? cc_yr : y) + height - fr_thickness; int bottom_frm = (cc_parent ? cc_yr : y) + height - 2*fr_thickness;
int bottom_item = cc_item->getRealYPos() + h_item; int bottom_item = cc_item->getRealYPos() + h_item;
int h_diff = bottom_item - bottom_frm; int h_diff = bottom_item - bottom_frm;
int new_h = h_item - h_diff; int new_h = h_item - h_diff;

View File

@@ -108,7 +108,7 @@ void CComponentsHeader::initVarHeader()
cch_text = ""; cch_text = "";
cch_col_text = COL_MENUHEAD_TEXT; cch_col_text = COL_MENUHEAD_TEXT;
cch_caption_align = CTextBox::NO_AUTO_LINEBREAK; cch_caption_align = CTextBox::NO_AUTO_LINEBREAK;
cch_items_y = 0; cch_items_y = 1;
cch_offset = 8; cch_offset = 8;
cch_icon_x = cch_offset; cch_icon_x = cch_offset;
cch_icon_w = 0; cch_icon_w = 0;