utils: move minSize to above windows.h (windows.h defines min/max as macros)

This commit is contained in:
John Regan
2021-07-20 14:08:53 -04:00
parent 5d691b5880
commit a20997aee4

View File

@@ -1022,6 +1022,10 @@ QColor Utils::monoIconColor()
return clampColor(QApplication::palette().color(QPalette::Active, QPalette::WindowText));
}
QSize Utils::minSize(const QSize& fst, const QSize& snd) {
return QSize(std::min(fst.width(), snd.width()), std::min(fst.height(), snd.height()));
}
#ifdef Q_OS_WIN
// This is down here, because windows.h includes ALL windows stuff - and we get conflicts with MessageBox :-(
#include <windows.h>
@@ -1058,6 +1062,3 @@ void Utils::raiseWindow(QWidget *w)
#endif
}
QSize Utils::minSize(const QSize &fst, const QSize &snd) {
return QSize(std::min(fst.width(), snd.width()), std::min(fst.height(), snd.height()));
}