diff options
author | Alexander Akulich <akulichalexander@gmail.com> | 2018-03-14 02:57:42 +0300 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2018-03-20 11:14:19 +0000 |
commit | 3d3b4013bfa5224bf1e192df90ce9d774c41b453 (patch) | |
tree | b672f88fe0b741c56186da7a9d8867454d194b88 | |
parent | 3ec397ff2efec43f7315d2025b827f3a249fd2f0 (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>
(cherry picked from commit 53f82185e9320e0561d5a424d7145aadc18cca30)
Reviewed-by: Yulong Bai <yulong.bai@qt.io>
-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 82228af4c6..4ccca93e01 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -801,8 +801,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)); @@ -1584,8 +1584,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) || |