diff --git a/src/gui/components/cc_frm.h b/src/gui/components/cc_frm.h index f97e15e23..6b2bd31cc 100644 --- a/src/gui/components/cc_frm.h +++ b/src/gui/components/cc_frm.h @@ -127,6 +127,7 @@ class CComponentsHeader : public CComponentsForm std::vector v_cch_btn; int cch_size_mode; int cch_caption_align; + bool userHeight; void initIcon(); void initCaption(); diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 73223928f..dcdb486a7 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -51,7 +51,10 @@ CComponentsHeader::CComponentsHeader( const int x_pos, const int y_pos, const in x = x_pos; y = y_pos; width = w; - height = h > 0 ? h : height; + if (h > 0) { + userHeight = true; + height = h; + } shadow = has_shadow; col_frame = color_frame; col_body = color_body; @@ -74,7 +77,10 @@ CComponentsHeader::CComponentsHeader( const int x_pos, const int y_pos, const in x = x_pos; y = y_pos; width = w; - height = h > 0 ? h : height; + if (h > 0) { + userHeight = true; + height = h; + } shadow = has_shadow; col_frame = color_frame; col_body = color_body; @@ -99,6 +105,7 @@ void CComponentsHeader::initVarHeader() cch_size_mode = CC_HEADER_SIZE_LARGE; cch_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]; height = cch_font->getHeight(); + userHeight = false; //CComponentsHeader cch_icon_obj = NULL; @@ -360,8 +367,10 @@ void CComponentsHeader::initCaption() void CComponentsHeader::initCCItems() { //set size - cch_font = (cch_size_mode == CC_HEADER_SIZE_LARGE? g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE] : g_Font[SNeutrinoSettings::FONT_TYPE_MENU]); - height = cch_font->getHeight(); + if (!userHeight) { + cch_font = (cch_size_mode == CC_HEADER_SIZE_LARGE? g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE] : g_Font[SNeutrinoSettings::FONT_TYPE_MENU]); + height = cch_font->getHeight(); + } //init icon initIcon();