[DEV] try to correct sizer error

This commit is contained in:
Edouard DUPIN 2016-02-03 21:15:07 +01:00
parent 75e120ceb3
commit fa0ef8e26c
26 changed files with 60 additions and 55 deletions

View File

@ -461,7 +461,7 @@ void ewol::Context::forceRedrawAll() {
} }
ivec2 size = getSize(); ivec2 size = getSize();
m_windowsCurrent->setSize(vec2(size.x(), size.y())); m_windowsCurrent->setSize(vec2(size.x(), size.y()));
m_windowsCurrent->onSizeChange(); m_windowsCurrent->onChangeSize();
} }
/* /*
void ewol::Context::OS_Stop() { void ewol::Context::OS_Stop() {

View File

@ -62,9 +62,9 @@ ewol::widget::Button::~Button() {
} }
void ewol::widget::Button::onSizeChange() { void ewol::widget::Button::onChangeSize() {
ewol::Padding padding = m_shaper->getPadding(); ewol::Padding padding = m_shaper->getPadding();
ewol::Padding ret = onSizeChangePadded(padding); ewol::Padding ret = onChangeSizePadded(padding);
//EWOL_DEBUG(" configuring : origin=" << origin << " size=" << subElementSize << ""); //EWOL_DEBUG(" configuring : origin=" << origin << " size=" << subElementSize << "");
m_selectableAreaPos = vec2(ret.xLeft(), ret.yButtom()); m_selectableAreaPos = vec2(ret.xLeft(), ret.yButtom());
m_selectableAreaSize = m_size - (m_selectableAreaPos + vec2(ret.xRight(), ret.yTop())); m_selectableAreaSize = m_size - (m_selectableAreaPos + vec2(ret.xRight(), ret.yTop()));

View File

@ -152,7 +152,7 @@ namespace ewol {
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual void onSizeChange(); virtual void onChangeSize();
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual bool onEventInput(const ewol::event::Input& _event); virtual bool onEventInput(const ewol::event::Input& _event);
virtual bool onEventEntry(const ewol::event::Entry& _event); virtual bool onEventEntry(const ewol::event::Entry& _event);

View File

@ -55,11 +55,11 @@ ewol::widget::CheckBox::~CheckBox() {
} }
void ewol::widget::CheckBox::onSizeChange() { void ewol::widget::CheckBox::onChangeSize() {
ewol::Padding padding = m_shaper->getPadding(); ewol::Padding padding = m_shaper->getPadding();
float boxSize = m_shaper->getConfigNumber(m_shaperIdSize); float boxSize = m_shaper->getConfigNumber(m_shaperIdSize);
padding.setXLeft(padding.xLeft()*2.0f + boxSize); padding.setXLeft(padding.xLeft()*2.0f + boxSize);
ewol::Padding ret = onSizeChangePadded(padding); ewol::Padding ret = onChangeSizePadded(padding);
EWOL_DEBUG(" configuring : padding=" << padding << " boxSize=" << boxSize << ""); EWOL_DEBUG(" configuring : padding=" << padding << " boxSize=" << boxSize << "");
m_selectableAreaPos = vec2(ret.xLeft()/*-boxSize*/, ret.yButtom()); m_selectableAreaPos = vec2(ret.xLeft()/*-boxSize*/, ret.yButtom());
m_selectableAreaSize = m_size - (m_selectableAreaPos + vec2(ret.xRight(), ret.yTop())); m_selectableAreaSize = m_size - (m_selectableAreaPos + vec2(ret.xRight(), ret.yTop()));

View File

@ -88,7 +88,7 @@ namespace ewol {
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual void onSizeChange(); virtual void onChangeSize();
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual bool onEventInput(const ewol::event::Input& _event); virtual bool onEventInput(const ewol::event::Input& _event);
virtual bool onEventEntry(const ewol::event::Entry& _event); virtual bool onEventEntry(const ewol::event::Entry& _event);

View File

@ -104,8 +104,8 @@ void ewol::widget::Container::systemDraw(const ewol::DrawProperty& _displayProp)
} }
} }
void ewol::widget::Container::onSizeChange() { void ewol::widget::Container::onChangeSize() {
ewol::Widget::onSizeChange(); ewol::Widget::onChangeSize();
if (m_subWidget == nullptr) { if (m_subWidget == nullptr) {
return; return;
} }
@ -130,7 +130,7 @@ void ewol::widget::Container::onSizeChange() {
} }
m_subWidget->setOrigin(origin); m_subWidget->setOrigin(origin);
m_subWidget->setSize(m_size); m_subWidget->setSize(m_size);
m_subWidget->onSizeChange(); m_subWidget->onChangeSize();
} }
void ewol::widget::Container::calculateMinMaxSize() { void ewol::widget::Container::calculateMinMaxSize() {
@ -205,7 +205,7 @@ void ewol::widget::Container::setOffset(const vec2& _newVal) {
if (m_offset != _newVal) { if (m_offset != _newVal) {
ewol::Widget::setOffset(_newVal); ewol::Widget::setOffset(_newVal);
// recalculate the new sise and position of sub widget ... // recalculate the new sise and position of sub widget ...
onSizeChange(); onChangeSize();
} }
} }

View File

@ -60,7 +60,7 @@ namespace ewol {
public: // Derived function public: // Derived function
virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void systemDraw(const ewol::DrawProperty& _displayProp);
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual void onSizeChange(); virtual void onChangeSize();
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos); virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos);
virtual std::shared_ptr<ewol::Object> getSubObjectNamed(const std::string& _objectName); virtual std::shared_ptr<ewol::Object> getSubObjectNamed(const std::string& _objectName);

View File

@ -114,8 +114,8 @@ void ewol::widget::Container2::systemDraw(const ewol::DrawProperty& _displayProp
} }
} }
ewol::Padding ewol::widget::Container2::onSizeChangePadded(const ewol::Padding& _padding) { ewol::Padding ewol::widget::Container2::onChangeSizePadded(const ewol::Padding& _padding) {
ewol::Widget::onSizeChange(); ewol::Widget::onChangeSize();
vec2 localAvaillable = m_size - vec2(_padding.x(), _padding.y()); vec2 localAvaillable = m_size - vec2(_padding.x(), _padding.y());
// Checkin the filling properties == > for the subElements: // Checkin the filling properties == > for the subElements:
vec2 subElementSize = m_minSize; vec2 subElementSize = m_minSize;
@ -150,7 +150,7 @@ ewol::Padding ewol::widget::Container2::onSizeChangePadded(const ewol::Padding&
} }
m_subWidget[iii]->setOrigin(m_origin + origin); m_subWidget[iii]->setOrigin(m_origin + origin);
m_subWidget[iii]->setSize(subElementSize); m_subWidget[iii]->setSize(subElementSize);
m_subWidget[iii]->onSizeChange(); m_subWidget[iii]->onChangeSize();
} }
} }
vec2 selectableAreaPos = origin-vec2(_padding.xLeft(), _padding.yButtom()); vec2 selectableAreaPos = origin-vec2(_padding.xLeft(), _padding.yButtom());

View File

@ -126,7 +126,7 @@ namespace ewol {
* @param[in] _padding Padding of the widget. * @param[in] _padding Padding of the widget.
* @note : INTERNAL EWOL SYSTEM * @note : INTERNAL EWOL SYSTEM
*/ */
virtual ewol::Padding onSizeChangePadded(const ewol::Padding& _padding = ewol::Padding(0,0,0,0)); virtual ewol::Padding onChangeSizePadded(const ewol::Padding& _padding = ewol::Padding(0,0,0,0));
/** /**
* @brief calculate the minimum and maximum size (need to estimate expend properties of the widget) * @brief calculate the minimum and maximum size (need to estimate expend properties of the widget)
* @param[in] _padding Padding of the widget. * @param[in] _padding Padding of the widget.
@ -158,8 +158,8 @@ namespace ewol {
public: // Derived function public: // Derived function
virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void systemDraw(const ewol::DrawProperty& _displayProp);
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual void onSizeChange() { virtual void onChangeSize() {
onSizeChangePadded(); onChangeSizePadded();
} }
virtual void calculateMinMaxSize() { virtual void calculateMinMaxSize() {
calculateMinMaxSizePadded(); calculateMinMaxSizePadded();

View File

@ -195,14 +195,14 @@ void ewol::widget::ContainerN::systemDraw(const ewol::DrawProperty& _displayProp
} }
} }
void ewol::widget::ContainerN::onSizeChange() { void ewol::widget::ContainerN::onChangeSize() {
for (auto &it : m_subWidget) { for (auto &it : m_subWidget) {
if (it == nullptr) { if (it == nullptr) {
continue; continue;
} }
it->setOrigin(m_origin+m_offset); it->setOrigin(m_origin+m_offset);
it->setSize(m_size); it->setSize(m_size);
it->onSizeChange(); it->onChangeSize();
} }
} }
@ -317,7 +317,7 @@ void ewol::widget::ContainerN::setOffset(const vec2& _newVal) {
if (m_offset != _newVal) { if (m_offset != _newVal) {
ewol::Widget::setOffset(_newVal); ewol::Widget::setOffset(_newVal);
// recalculate the new sise and position of sub widget ... // recalculate the new sise and position of sub widget ...
onSizeChange(); onChangeSize();
} }
} }

View File

@ -96,7 +96,7 @@ namespace ewol {
public:// Derived function public:// Derived function
virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void systemDraw(const ewol::DrawProperty& _displayProp);
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual void onSizeChange(); virtual void onChangeSize();
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos); virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos);
virtual std::shared_ptr<ewol::Object> getSubObjectNamed(const std::string& _objectName); virtual std::shared_ptr<ewol::Object> getSubObjectNamed(const std::string& _objectName);

View File

@ -49,7 +49,7 @@ ewol::widget::ContextMenu::~ContextMenu() {
} }
void ewol::widget::ContextMenu::onSizeChange() { void ewol::widget::ContextMenu::onChangeSize() {
// pop-up fill all the display : // pop-up fill all the display :
ewol::Padding padding = m_shaper->getPadding(); ewol::Padding padding = m_shaper->getPadding();
EWOL_VERBOSE("our origin=" << m_origin << " size=" << m_size); EWOL_VERBOSE("our origin=" << m_origin << " size=" << m_size);
@ -109,7 +109,7 @@ void ewol::widget::ContextMenu::onSizeChange() {
EWOL_VERBOSE(" == > sub origin=" << subWidgetOrigin << " size=" << subWidgetSize); EWOL_VERBOSE(" == > sub origin=" << subWidgetOrigin << " size=" << subWidgetSize);
m_subWidget->setOrigin(subWidgetOrigin); m_subWidget->setOrigin(subWidgetOrigin);
m_subWidget->setSize(subWidgetSize); m_subWidget->setSize(subWidgetSize);
m_subWidget->onSizeChange(); m_subWidget->onChangeSize();
} }
markToRedraw(); markToRedraw();
} }

View File

@ -65,7 +65,7 @@ namespace ewol {
public: // Derived function public: // Derived function
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual bool onEventInput(const ewol::event::Input& _event); virtual bool onEventInput(const ewol::event::Input& _event);
virtual void onSizeChange(); virtual void onChangeSize();
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos); virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos);
}; };

View File

@ -47,7 +47,7 @@ void ewol::widget::Gird::setBorderSize(const ivec2& _newBorderSize) {
requestUpdateSize(); requestUpdateSize();
} }
void ewol::widget::Gird::onSizeChange() { void ewol::widget::Gird::onChangeSize() {
//EWOL_DEBUG("Update size"); //EWOL_DEBUG("Update size");
m_size -= m_borderSize*2; m_size -= m_borderSize*2;
@ -77,7 +77,7 @@ void ewol::widget::Gird::onSizeChange() {
m_subWidget[iii].widget->setOrigin(vec2ClipInt32(tmpOrigin)); m_subWidget[iii].widget->setOrigin(vec2ClipInt32(tmpOrigin));
// all time set oll the space . // all time set oll the space .
m_subWidget[iii].widget->setSize(vec2ClipInt32(vec2(abs(m_sizeCol[m_subWidget[iii].col]), m_uniformSizeRow))); m_subWidget[iii].widget->setSize(vec2ClipInt32(vec2(abs(m_sizeCol[m_subWidget[iii].col]), m_uniformSizeRow)));
m_subWidget[iii].widget->onSizeChange(); m_subWidget[iii].widget->onChangeSize();
} }
} }
m_size += m_borderSize*2; m_size += m_borderSize*2;

View File

@ -138,7 +138,7 @@ namespace ewol {
virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void systemDraw(const ewol::DrawProperty& _displayProp);
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& pos); virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& pos);
virtual void onSizeChange(); virtual void onChangeSize();
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
}; };
}; };

View File

@ -43,7 +43,7 @@ void ewol::widget::PopUp::setShaperName(const std::string& _shaperName) {
markToRedraw(); markToRedraw();
} }
void ewol::widget::PopUp::onSizeChange() { void ewol::widget::PopUp::onChangeSize() {
markToRedraw(); markToRedraw();
if (nullptr == m_subWidget) { if (nullptr == m_subWidget) {
return; return;
@ -75,7 +75,7 @@ void ewol::widget::PopUp::onSizeChange() {
m_subWidget->setOrigin(subWidgetOrigin); m_subWidget->setOrigin(subWidgetOrigin);
m_subWidget->setSize(subWidgetSize); m_subWidget->setSize(subWidgetSize);
m_subWidget->onSizeChange(); m_subWidget->onChangeSize();
} }
void ewol::widget::PopUp::systemDraw(const ewol::DrawProperty& _displayProp) { void ewol::widget::PopUp::systemDraw(const ewol::DrawProperty& _displayProp) {

View File

@ -75,7 +75,7 @@ namespace ewol {
virtual void periodicCall(const ewol::event::Time& _event); virtual void periodicCall(const ewol::event::Time& _event);
virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void systemDraw(const ewol::DrawProperty& _displayProp);
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual void onSizeChange(); virtual void onChangeSize();
virtual bool onEventInput(const ewol::event::Input& _event); virtual bool onEventInput(const ewol::event::Input& _event);
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos); virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos);
protected: protected:

View File

@ -37,8 +37,8 @@ ewol::widget::Sizer::~Sizer() {
} }
void ewol::widget::Sizer::onSizeChange() { void ewol::widget::Sizer::onChangeSize() {
ewol::Widget::onSizeChange(); ewol::Widget::onChangeSize();
vec2 tmpBorderSize = m_borderSize->getPixel(); vec2 tmpBorderSize = m_borderSize->getPixel();
EWOL_VERBOSE("[" << getId() << "] update size : " << m_size << " nbElement : " << m_subWidget.size() << " borderSize=" << tmpBorderSize << " from border=" << m_borderSize); EWOL_VERBOSE("[" << getId() << "] update size : " << m_size << " nbElement : " << m_subWidget.size() << " borderSize=" << tmpBorderSize << " from border=" << m_borderSize);
vec2 localWidgetSize = m_size - tmpBorderSize*2.0f; vec2 localWidgetSize = m_size - tmpBorderSize*2.0f;
@ -107,7 +107,7 @@ void ewol::widget::Sizer::onSizeChange() {
tmpSizeMin.setY(sizeExpand); tmpSizeMin.setY(sizeExpand);
} }
if (it->canExpand().x() == true) { if (it->canExpand().x() == true) {
float sizeExpand = std::avg(tmpSizeMin.x(), minSize.x(), tmpSizeMax.x()); float sizeExpand = std::avg(tmpSizeMin.x(), localWidgetSize.x(), tmpSizeMax.x());
tmpSizeMin.setX(sizeExpand); tmpSizeMin.setX(sizeExpand);
} }
it->setSize(tmpSizeMin); it->setSize(tmpSizeMin);
@ -122,7 +122,7 @@ void ewol::widget::Sizer::onSizeChange() {
tmpSizeMin.setX(sizeExpand); tmpSizeMin.setX(sizeExpand);
} }
if (it->canExpand().y() == true) { if (it->canExpand().y() == true) {
float sizeExpand = std::avg(tmpSizeMin.y(), minSize.y(), tmpSizeMax.y()); float sizeExpand = std::avg(tmpSizeMin.y(), localWidgetSize.y(), tmpSizeMax.y());
tmpSizeMin.setY(sizeExpand); tmpSizeMin.setY(sizeExpand);
} }
it->setSize(tmpSizeMin); it->setSize(tmpSizeMin);
@ -165,7 +165,7 @@ void ewol::widget::Sizer::onSizeChange() {
if (it == nullptr) { if (it == nullptr) {
continue; continue;
} }
it->onSizeChange(); it->onChangeSize();
} }
markToRedraw(); markToRedraw();
} }

View File

@ -139,7 +139,7 @@ namespace ewol {
private: private:
ewol::compositing::Drawing m_draw; //!< Compositing drawing element for display the border. ewol::compositing::Drawing m_draw; //!< Compositing drawing element for display the border.
public: // Derived function public: // Derived function
virtual void onSizeChange(); virtual void onChangeSize();
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
// overwrite the set fuction to start annimations ... // overwrite the set fuction to start annimations ...
virtual int32_t subWidgetAdd(std::shared_ptr<ewol::Widget> _newWidget); virtual int32_t subWidgetAdd(std::shared_ptr<ewol::Widget> _newWidget);

View File

@ -43,8 +43,8 @@ ewol::widget::WSlider::~WSlider() {
} }
void ewol::widget::WSlider::onSizeChange() { void ewol::widget::WSlider::onChangeSize() {
ewol::widget::ContainerN::onSizeChange(); ewol::widget::ContainerN::onChangeSize();
if (m_windowsDestination == m_windowsSources) { if (m_windowsDestination == m_windowsSources) {
auto it = m_subWidget.begin(); auto it = m_subWidget.begin();
std::advance(it, m_windowsDestination); std::advance(it, m_windowsDestination);
@ -52,7 +52,7 @@ void ewol::widget::WSlider::onSizeChange() {
&& *it != nullptr) { && *it != nullptr) {
(*it)->setOrigin(m_origin+m_offset); (*it)->setOrigin(m_origin+m_offset);
(*it)->setSize(m_size); (*it)->setSize(m_size);
(*it)->onSizeChange(); (*it)->onChangeSize();
} }
} else { } else {
float factor = -1.0f; float factor = -1.0f;
@ -73,7 +73,7 @@ void ewol::widget::WSlider::onSizeChange() {
+ m_offset); + m_offset);
} }
(*it)->setSize(m_size); (*it)->setSize(m_size);
(*it)->onSizeChange(); (*it)->onChangeSize();
} }
it = m_subWidget.begin(); it = m_subWidget.begin();
std::advance(it, m_windowsDestination); std::advance(it, m_windowsDestination);
@ -89,7 +89,7 @@ void ewol::widget::WSlider::onSizeChange() {
+ m_offset); + m_offset);
} }
(*it)->setSize(m_size); (*it)->setSize(m_size);
(*it)->onSizeChange(); (*it)->onChangeSize();
} }
} }
markToRedraw(); markToRedraw();
@ -205,7 +205,7 @@ void ewol::widget::WSlider::periodicCall(const ewol::event::Time& _event) {
m_slidingProgress += _event.getDeltaCall()/m_transitionSpeed; m_slidingProgress += _event.getDeltaCall()/m_transitionSpeed;
m_slidingProgress = std::avg(0.0f, m_slidingProgress, 1.0f); m_slidingProgress = std::avg(0.0f, m_slidingProgress, 1.0f);
} }
onSizeChange(); onChangeSize();
} }
void ewol::widget::WSlider::systemDraw(const ewol::DrawProperty& _displayProp) { void ewol::widget::WSlider::systemDraw(const ewol::DrawProperty& _displayProp) {

View File

@ -99,7 +99,7 @@ namespace ewol {
return m_transitionSlide; return m_transitionSlide;
}; };
public: // Derived function public: // Derived function
virtual void onSizeChange(); virtual void onChangeSize();
virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void systemDraw(const ewol::DrawProperty& _displayProp);
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos); virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos);

View File

@ -146,7 +146,8 @@ ewol::Widget::~Widget() {
shortCutClean(); shortCutClean();
} }
void ewol::Widget::onSizeChange() { void ewol::Widget::onChangeSize() {
EWOL_VERBOSE("[" << getId() << "] {" << getObjectType() << "} update size : " << m_size);
markToRedraw(); markToRedraw();
} }

View File

@ -151,7 +151,7 @@ namespace ewol {
* @brief Parent have set the size and the origin. the container need to update the subwidget property * @brief Parent have set the size and the origin. the container need to update the subwidget property
* @note : INTERNAL EWOL SYSTEM * @note : INTERNAL EWOL SYSTEM
*/ */
virtual void onSizeChange(); virtual void onChangeSize();
virtual void calculateSize() {}; virtual void calculateSize() {};
/** /**
* @brief get the widget size * @brief get the widget size

View File

@ -41,21 +41,21 @@ ewol::widget::Windows::~Windows() {
m_popUpWidgetList.clear(); m_popUpWidgetList.clear();
} }
void ewol::widget::Windows::onSizeChange() { void ewol::widget::Windows::onChangeSize() {
ewol::Widget::onSizeChange(); ewol::Widget::onChangeSize();
if (m_subWidget != nullptr) { if (m_subWidget != nullptr) {
m_subWidget->calculateMinMaxSize(); m_subWidget->calculateMinMaxSize();
// TODO : do it better ... and manage gravity ... // TODO : do it better ... and manage gravity ...
m_subWidget->setSize(m_size); m_subWidget->setSize(m_size);
m_subWidget->setOrigin(vec2(0.0f, 0.0f)); m_subWidget->setOrigin(vec2(0.0f, 0.0f));
m_subWidget->onSizeChange(); m_subWidget->onChangeSize();
} }
for (auto &it : m_popUpWidgetList) { for (auto &it : m_popUpWidgetList) {
if(it != nullptr) { if(it != nullptr) {
it->calculateMinMaxSize(); it->calculateMinMaxSize();
it->setSize(m_size); it->setSize(m_size);
it->setOrigin(vec2(0.0f, 0.0f)); it->setOrigin(vec2(0.0f, 0.0f));
it->onSizeChange(); it->onChangeSize();
} }
} }
} }
@ -172,7 +172,7 @@ void ewol::widget::Windows::setSubWidget(std::shared_ptr<ewol::Widget> _widget)
} }
// Regenerate the size calculation : // Regenerate the size calculation :
onSizeChange(); onChangeSize();
} }
void ewol::widget::Windows::popUpWidgetPush(std::shared_ptr<ewol::Widget> _widget) { void ewol::widget::Windows::popUpWidgetPush(std::shared_ptr<ewol::Widget> _widget) {
@ -186,7 +186,7 @@ void ewol::widget::Windows::popUpWidgetPush(std::shared_ptr<ewol::Widget> _widge
// force the focus on the basic widget ==> this remove many time the virual keyboard area // force the focus on the basic widget ==> this remove many time the virual keyboard area
_widget->keepFocus(); _widget->keepFocus();
// Regenerate the size calculation : // Regenerate the size calculation :
onSizeChange(); onChangeSize();
// TODO : it is dangerous to access directly to the system ... // TODO : it is dangerous to access directly to the system ...
getContext().resetIOEvent(); getContext().resetIOEvent();
} }

View File

@ -77,7 +77,7 @@ namespace ewol {
virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void systemDraw(const ewol::DrawProperty& _displayProp);
public: // Derived function public: // Derived function
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual void onSizeChange(); virtual void onChangeSize();
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos); virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos);
virtual void requestDestroyFromChild(const std::shared_ptr<Object>& _child); virtual void requestDestroyFromChild(const std::shared_ptr<Object>& _child);
virtual std::shared_ptr<ewol::Object> getSubObjectNamed(const std::string& _objectName); virtual std::shared_ptr<ewol::Object> getSubObjectNamed(const std::string& _objectName);

View File

@ -1,10 +1,14 @@
<composer> <composer>
<sizer mode="vert" <sizer mode="vert"
expand="true,true" expand="true,true"
fill="true,true"> fill="true,true"
border="10px"
border-color="#F008">
<spacer expand="true,true" fill="true,true" color="red"/> <spacer expand="true,true" fill="true,true" color="red"/>
<spacer expand="true,true" fill="true,true" color="green"/>
<spacer expand="false,true" fill="true,true" color="green"/>
<spacer expand="true,true" fill="true,true" color="blue"/> <spacer expand="true,true" fill="true,true" color="blue"/>
<!-- <!--
<sizer mode="hori" <sizer mode="hori"
expand="true,false" expand="true,false"