mirror of
https://github.com/edubart/otclient.git
synced 2025-11-07 13:56:22 +01:00
Fix compilation under MSVC
Use template for std::min and std::max
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user