From 09beeabc34e16800f700c652c0e61f8f16bdfbe5 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 5 Nov 2016 21:13:58 +0100 Subject: [PATCH] CComponentsInfoBox: ensure matching object height after assigned image Images are not defined with constructor, so it is possible we must consider the image height after called setPicture() methode. This is important if an infobox sould be added into a cc form object. This avoids overlapping of dynamic added items. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/18695fb0c94884907bfe9d7d0c1e2b7d10dd7673 Author: Thilo Graf Date: 2016-11-05 (Sat, 05 Nov 2016) ------------------ This commit was generated by Migit --- src/gui/components/cc_item_infobox.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/components/cc_item_infobox.cpp b/src/gui/components/cc_item_infobox.cpp index a2a6b6cbb..bc41347b0 100644 --- a/src/gui/components/cc_item_infobox.cpp +++ b/src/gui/components/cc_item_infobox.cpp @@ -83,6 +83,11 @@ CComponentsInfoBox::~CComponentsInfoBox() void CComponentsInfoBox::setPicture(const std::string& picture_name) { pic_name = picture_name; + if (!pic_name.empty()){ + int w, h; + frameBuffer->getIconSize(pic_name.c_str(), &w, &h); + height = max(h, height); + } } void CComponentsInfoBox::setPicture(const char* picture_name)