From d61e97411739f080a3a8a93c5726af37a30b206b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 25 Mar 2018 22:48:12 +0200 Subject: [PATCH] src/gui/components/cc_frm_icons.cpp: initialize of dimensions dependently from added icons ... so it is possible to get usable dimension values. Useful if in parent object none values or too small dimensions are defined. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/4550ba4d24f9d62ab0eb1739f86182ea1e04e049 Author: Thilo Graf Date: 2018-03-25 (Sun, 25 Mar 2018) --- src/gui/components/cc_frm_icons.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_icons.cpp b/src/gui/components/cc_frm_icons.cpp index 4f184534f..ac3f050e9 100644 --- a/src/gui/components/cc_frm_icons.cpp +++ b/src/gui/components/cc_frm_icons.cpp @@ -84,7 +84,10 @@ void CComponentsIconForm::addIcon(const std::string& icon_name) icon_name, this); ccp->doPaintBg(false); - + int dx, dy; + ccp->getRealSize(&dx, &dy); + height = max(height, dy); + width = max(width, dx); initChainItems(); }