diff options
author | Alexander Akulich <akulichalexander@gmail.com> | 2018-03-14 02:57:42 +0300 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-03-15 23:51:49 +0000 |
commit | 53f82185e9320e0561d5a424d7145aadc18cca30 (patch) | |
tree | 1e55876fef5f748db3479e3ba7818863a513ad4f /src/widgets/styles/qfusionstyle.cpp | |
parent | 8edc08ef78202f42f373efc6f0814744b01eac9a (diff) |
QFusionStyle: Fix compilation when qreal is float
Change-Id: I575d348915a7239a40b589012b4e9707bd15d1dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/styles/qfusionstyle.cpp')
-rw-r--r-- | src/widgets/styles/qfusionstyle.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index 6873ca876e..0c6825cb36 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -778,8 +778,8 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem, } else if (checkbox->state & State_On) { qreal penWidth = QStyleHelper::dpiScaled(1.5); - penWidth = qMax(penWidth , 0.13 * rect.height()); - penWidth = qMin(penWidth , 0.20 * rect.height()); + penWidth = qMax<qreal>(penWidth, 0.13 * rect.height()); + penWidth = qMin<qreal>(penWidth, 0.20 * rect.height()); QPen checkPen = QPen(checkMarkColor, penWidth); checkMarkColor.setAlpha(210); painter->translate(dpiScaled(-0.8), dpiScaled(0.5)); @@ -1562,8 +1562,8 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio bool ignoreCheckMark = false; const int checkColHOffset = windowsItemHMargin + windowsItemFrame - 1; - int checkcol = qMax(menuItem->rect.height() * 0.79, - qMax(menuItem->maxIconWidth * 1.0, dpiScaled(21))); // icon checkbox's highlihgt column width + int checkcol = qMax<int>(menuItem->rect.height() * 0.79, + qMax<int>(menuItem->maxIconWidth, dpiScaled(21))); // icon checkbox's highlight column width if ( #if QT_CONFIG(combobox) qobject_cast<const QComboBox*>(widget) || |