Skip to content

Commit

Permalink
QFusionStyle: Fix compilation when qreal is float
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kaffeine authored and jaheikk committed Mar 20, 2018
1 parent 3ec397f commit 3d3b401
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/widgets/styles/qfusionstyle.cpp
Expand Up @@ -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));
Expand Down Expand Up @@ -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) ||
Expand Down

0 comments on commit 3d3b401

Please sign in to comment.