CComponentsHeader: fix order of width calculation

Required for following position calculation


Origin commit data
------------------
Commit: 107db09299
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-05-10 (Wed, 10 May 2017)
This commit is contained in:
2017-05-10 10:42:08 +02:00
parent 3e0a8d3ff0
commit 783d2efe04

View File

@@ -576,20 +576,20 @@ void CComponentsHeader::initCaption()
//set header text properties
if (cch_text_obj){
//recalc caption width
cc_text_w = min(cc_text_w, cch_font->getRenderWidth(cch_text)/*+ OFFSET_INNER_MID*/);
//set alignment of text item in dependency from text alignment
if (cch_caption_align == CTextBox::CENTER)
cch_text_x = CC_CENTERED;
//recalc caption width
cc_text_w = min(cc_text_w, cch_font->getRenderWidth(cch_text)+ OFFSET_INNER_MID);
//assign general properties
cch_text_obj->setDimensionsAll(cch_text_x, cch_items_y, cc_text_w, height);
cch_text_obj->setColorBody(col_body);
if (cc_body_gradient_enable != cc_body_gradient_enable_old)
cch_text_obj->getCTextBoxObject()->clearScreenBuffer();
cch_text_obj->setTextColor(cch_col_text);
cch_text_obj->setText(cch_text, cch_caption_align, cch_font);
cch_text_obj->setText(cch_text, cch_caption_align, cch_font, cch_col_text);
cch_text_obj->enableTboxSaveScreen(cc_body_gradient_enable || cc_txt_save_screen);
//corner of text item