From 13802b799c98a6cd1034c721a33b70ff04ea797f Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Fri, 17 May 2013 07:40:20 +0200 Subject: [PATCH] [DEV] add debug --- sources/ewol/widget/Container.cpp | 1 + sources/ewol/widget/PopUp.cpp | 16 ++++++++-------- sources/ewol/widget/Widget.cpp | 1 + 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/sources/ewol/widget/Container.cpp b/sources/ewol/widget/Container.cpp index a8262ff2..1c802a84 100644 --- a/sources/ewol/widget/Container.cpp +++ b/sources/ewol/widget/Container.cpp @@ -133,6 +133,7 @@ void widget::Container::CalculateMinMaxSize(void) vec2 min = m_subWidget->GetCalculateMinSize(); m_minSize.setMax(min); } + EWOL_ERROR("[" << GetId() << "] Result min size : " << m_minSize); } void widget::Container::OnRegenerateDisplay(void) diff --git a/sources/ewol/widget/PopUp.cpp b/sources/ewol/widget/PopUp.cpp index c90fb89a..b365180b 100644 --- a/sources/ewol/widget/PopUp.cpp +++ b/sources/ewol/widget/PopUp.cpp @@ -38,31 +38,31 @@ void widget::PopUp::CalculateSize(const vec2& _availlable) m_size = _availlable; if (NULL != m_subWidget) { vec2 subElementSize = m_minSize; - EWOL_DEBUG(" subElementSize : " << subElementSize); + EWOL_DEBUG("[" << GetId() << "] popUP: m_minSize : " << subElementSize); vec2 subElementOrigin = m_origin + (m_size-m_minSize)/2.0f; - EWOL_DEBUG(" subElementOrigin : " << subElementOrigin); + EWOL_DEBUG("[" << GetId() << "] popUP: subElementOrigin : " << subElementOrigin); vec2 subWidgetSize = m_subWidget->GetCalculateMinSize(); - EWOL_DEBUG(" subWidgetSize : " << subWidgetSize); + EWOL_DEBUG("[" << GetId() << "] popUP: subWidgetSize : " << subWidgetSize); if (true == m_subWidget->CanExpand().x()) { subWidgetSize.setX(m_minSize.x()); } if (true == m_subWidget->CanExpand().y()) { subWidgetSize.setY(m_minSize.y()); } - EWOL_DEBUG(" subWidgetSize : " << subWidgetSize); + EWOL_DEBUG("[" << GetId() << "] popUP: subWidgetSize : " << subWidgetSize); // limit the size of the element : subWidgetSize.setMin(m_minSize); - EWOL_DEBUG(" subWidgetSize : " << subWidgetSize); + EWOL_DEBUG("[" << GetId() << "] popUP: subWidgetSize : " << subWidgetSize); // posiition at a int32_t pos : subWidgetSize = vec2ClipInt32(subWidgetSize); - EWOL_DEBUG(" subWidgetSize : " << subWidgetSize); + EWOL_DEBUG("[" << GetId() << "] popUP: subWidgetSize : " << subWidgetSize); // set config to the Sub-widget vec2 subWidgetOrigin = m_origin + (m_size-subWidgetSize)/2.0f; - EWOL_DEBUG(" subWidgetOrigin : " << subWidgetOrigin); + EWOL_DEBUG("[" << GetId() << "] popUP: subWidgetOrigin : " << subWidgetOrigin); subWidgetOrigin = vec2ClipInt32(subWidgetOrigin); - EWOL_DEBUG(" subWidgetOrigin : " << subWidgetOrigin); + EWOL_DEBUG("[" << GetId() << "] popUP: subWidgetOrigin : " << subWidgetOrigin); m_subWidget->SetOrigin(subWidgetOrigin); m_subWidget->CalculateSize(subWidgetSize); diff --git a/sources/ewol/widget/Widget.cpp b/sources/ewol/widget/Widget.cpp index 3b261377..a565c641 100644 --- a/sources/ewol/widget/Widget.cpp +++ b/sources/ewol/widget/Widget.cpp @@ -415,6 +415,7 @@ vec2 ewol::Widget::RelativePosition(const vec2& _pos) void ewol::Widget::CalculateMinMaxSize(void) { m_minSize = m_userMinSize.GetPixel(); + EWOL_ERROR("[" << GetId() << "] convert in min size : " << m_userMinSize << " out=" << m_minSize); m_maxSize = m_userMaxSize.GetPixel(); MarkToRedraw(); }