33 if(node->tag() ==
"align-right")
46 std::reverse(widgets.begin(), widgets.end());
51 int preferredWidth = 0;
55 if(!widget->isExplicitlyVisible())
58 Size size = widget->getSize();
60 gap = (
m_alignRight) ? -(widget->getMarginRight()+widget->getWidth()) : widget->getMarginLeft();
62 preferredWidth += gap;
64 if(widget->isFixedSize()) {
66 pos.
y = paddingRect.
top() + widget->getMarginTop();
68 pos.
y = paddingRect.
bottom() - widget->getHeight() - widget->getMarginBottom();
69 pos.
y = std::max<int>(pos.
y, paddingRect.
top());
71 pos.
y = paddingRect.
top() + (paddingRect.
height() - (widget->getMarginTop() + widget->getHeight() + widget->getMarginBottom()))/2;
72 pos.
y = std::max<int>(pos.
y, paddingRect.
top());
76 size.
setHeight(paddingRect.
height() - (widget->getMarginTop() + widget->getMarginBottom()));
83 gap = (
m_alignRight) ? -widget->getMarginLeft() : (widget->getWidth() + widget->getMarginRight());
86 preferredWidth += gap;
95 parentWidget->
setWidth(preferredWidth);