utils: move minSize to above windows.h (windows.h defines min/max as macros)
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user