From 544e3bb8efc461221b96d625e9b7d3ea460d6060 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 14 Mar 2013 15:24:54 +0100 Subject: [PATCH] CComponentsHeader: init text always before paint header --- src/gui/components/cc_frm_header.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 23a3178d5..4b6460885 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -263,13 +263,15 @@ void CComponentsHeader::initCCHeaderText() #ifdef DEBUG_CC printf(" [CComponentsHeader]\n [%s - %d] init header text: %s\n", __FUNCTION__, __LINE__, cch_text.c_str()); #endif - cch_text_obj = new CComponentsText(cch_text_x, cch_items_y, width-cch_icon_w-fr_thickness, height-2*fr_thickness, cch_text.c_str()); + cch_text_obj = new CComponentsText(cch_text_x, cch_items_y, width-cch_icon_w-fr_thickness, height-2*fr_thickness/*, cch_text.c_str()*/); //add text item addCCItem(cch_text_obj); //text } //set header text properties if (cch_text_obj){ + cch_text_obj->setText(cch_text); + cch_text_obj->setTextMode(CTextBox::AUTO_WIDTH); cch_text_obj->setTextFont(cch_font); cch_text_obj->setTextColor(cch_col_text); cch_text_obj->setColorBody(col_body);