Fix compilation under MSVC

Use template for std::min and std::max
This commit is contained in:
conde2
2013-11-30 23:08:43 -02:00
parent b61f509755
commit ca2fe9cf45
10 changed files with 28 additions and 28 deletions

View File

@@ -66,10 +66,10 @@ bool UIHorizontalLayout::internalUpdate()
pos.y = paddingRect.top() + widget->getMarginTop();
} else if(widget->getTextAlign() & Fw::AlignBottom) {
pos.y = paddingRect.bottom() - widget->getHeight() - widget->getMarginBottom();
pos.y = std::max(pos.y, paddingRect.top());
pos.y = std::max<int>(pos.y, paddingRect.top());
} else { // center it
pos.y = paddingRect.top() + (paddingRect.height() - (widget->getMarginTop() + widget->getHeight() + widget->getMarginBottom()))/2;
pos.y = std::max(pos.y, paddingRect.top());
pos.y = std::max<int>(pos.y, paddingRect.top());
}
} else {
// expand height