From 79c4ad05a262c6ed4e221c7be002a6e7deb2e3e4 Mon Sep 17 00:00:00 2001 From: micha-bbg Date: Mon, 27 Aug 2012 03:18:04 +0200 Subject: [PATCH] * Move hMax correction from CComponentsItemBox to CComponentsTitleBar --- src/gui/components/components.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/components/components.cpp b/src/gui/components/components.cpp index 2a07d4e76..a861d17e3 100644 --- a/src/gui/components/components.cpp +++ b/src/gui/components/components.cpp @@ -994,8 +994,6 @@ void CComponentsItemBox::calculateElementsInitPart1() if (v_element_data[i].type != CC_ITEMBOX_PICTURE) hMax = max(v_element_data[i].height, hMax); } - if (!has_TextElement) - hMax = max(font_text->getHeight(), hMax); } void CComponentsItemBox::calculateElementsInitPart2() @@ -1157,6 +1155,10 @@ void CComponentsTitleBar::calculateElements() calculateElementsInitPart1(); + // hMax correction if no text element. + if (!has_TextElement) + hMax = max(font_text->getHeight(), hMax); + // Calculate logo for (i = 0; i < v_element_data.size(); i++) { if (v_element_data[i].type == CC_ITEMBOX_PICTURE) {