diff options
author | miniak <milan.burda@gmail.com> | 2011-03-31 14:12:09 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2011-03-31 14:12:09 (GMT) |
commit | b202e94bb1e5985aeccea360deef368580e72369 (patch) | |
tree | e0c5bfd294381ac50e3659dd4c30b55eaad27932 /src/gui/styles | |
parent | d47ed6666e4a47d8edebf487dcd61a08f313302a (diff) | |
download | Qt-b202e94bb1e5985aeccea360deef368580e72369.zip Qt-b202e94bb1e5985aeccea360deef368580e72369.tar.gz Qt-b202e94bb1e5985aeccea360deef368580e72369.tar.bz2 |
Replace CL_MIN/CL_MAX by qMin/qMax
Merge-request: 1011
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qcleanlooksstyle.cpp | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp index 8a2a88b..cc5fe10 100644 --- a/src/gui/styles/qcleanlooksstyle.cpp +++ b/src/gui/styles/qcleanlooksstyle.cpp @@ -68,9 +68,6 @@ #include <qlibrary.h> #include <private/qstylehelper_p.h> -#define CL_MAX(a,b) (a)>(b) ? (a):(b) // ### qMin/qMax does not work for vc6 -#define CL_MIN(a,b) (a)<(b) ? (a):(b) // remove this when it is working - QT_BEGIN_NAMESPACE using namespace QStyleHelper; @@ -533,8 +530,8 @@ static void qt_cleanlooks_draw_mdibutton(QPainter *painter, const QStyleOptionTi { QColor dark; dark.setHsv(option->palette.button().color().hue(), - CL_MIN(255, (int)(option->palette.button().color().saturation()*1.9)), - CL_MIN(255, (int)(option->palette.button().color().value()*0.7))); + qMin(255, (int)(option->palette.button().color().saturation()*1.9)), + qMin(255, (int)(option->palette.button().color().value()*0.7))); QColor highlight = option->palette.highlight().color(); @@ -691,11 +688,11 @@ void QCleanlooksStyle::drawPrimitive(PrimitiveElement elem, QColor darkOutline; QColor dark; darkOutline.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*3.0)), - CL_MIN(255, (int)(button.value()*0.6))); + qMin(255, (int)(button.saturation()*3.0)), + qMin(255, (int)(button.value()*0.6))); dark.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*1.9)), - CL_MIN(255, (int)(button.value()*0.7))); + qMin(255, (int)(button.saturation()*1.9)), + qMin(255, (int)(button.value()*0.7))); QColor tabFrameColor = mergedColors(option->palette.background().color(), dark.lighter(135), 60); @@ -1117,8 +1114,8 @@ void QCleanlooksStyle::drawPrimitive(PrimitiveElement elem, QColor gradientMidColor = option->palette.button().color(); QColor gradientStopColor; gradientStopColor.setHsv(buttonColor.hue(), - CL_MIN(255, (int)(buttonColor.saturation()*1.9)), - CL_MIN(255, (int)(buttonColor.value()*0.96))); + qMin(255, (int)(buttonColor.saturation()*1.9)), + qMin(255, (int)(buttonColor.value()*0.96))); QRect gradRect = rect.adjusted(1, 2, -1, -2); // gradient fill @@ -1384,12 +1381,12 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o QColor button = option->palette.button().color(); QColor dark; dark.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*1.9)), - CL_MIN(255, (int)(button.value()*0.7))); + qMin(255, (int)(button.saturation()*1.9)), + qMin(255, (int)(button.value()*0.7))); QColor darkOutline; darkOutline.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*2.0)), - CL_MIN(255, (int)(button.value()*0.6))); + qMin(255, (int)(button.saturation()*2.0)), + qMin(255, (int)(button.value()*0.6))); QRect rect = option->rect; QColor shadow = mergedColors(option->palette.background().color().darker(120), dark.lighter(130), 60); @@ -1662,8 +1659,8 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o QColor gradientStopColor; QColor gradientStartColor = option->palette.button().color(); gradientStopColor.setHsv(gradientStartColor.hue(), - CL_MIN(255, (int)(gradientStartColor.saturation()*2)), - CL_MIN(255, (int)(gradientStartColor.value()*0.96))); + qMin(255, (int)(gradientStartColor.saturation()*2)), + qMin(255, (int)(gradientStartColor.value()*0.96))); QLinearGradient gradient(rect.topLeft(), rect.bottomLeft()); if (option->palette.background().gradient()) { gradient.setStops(option->palette.background().gradient()->stops()); @@ -2425,14 +2422,14 @@ void QCleanlooksStyle::drawComplexControl(ComplexControl control, const QStyleOp QColor grooveColor; QColor darkOutline; dark.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*1.9)), - CL_MIN(255, (int)(button.value()*0.7))); + qMin(255, (int)(button.saturation()*1.9)), + qMin(255, (int)(button.value()*0.7))); grooveColor.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*2.6)), - CL_MIN(255, (int)(button.value()*0.9))); + qMin(255, (int)(button.saturation()*2.6)), + qMin(255, (int)(button.value()*0.9))); darkOutline.setHsv(button.hue(), - CL_MIN(255, (int)(button.saturation()*3.0)), - CL_MIN(255, (int)(button.value()*0.6))); + qMin(255, (int)(button.saturation()*3.0)), + qMin(255, (int)(button.value()*0.6))); QColor alphaCornerColor; if (widget) { |