summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-05-15 16:10:12 +0200
committerNorwegian Rock Cat <qt-info@nokia.com>2009-05-15 16:10:12 +0200
commit25213744d532257fdf20dddd91bfadb272c066a5 (patch)
tree7926f463aa297dc5394ba4cf0330360a2aa068f4
parent449d98636282221765465a2a6f4f789b62eef9e0 (diff)
Push down the typedef.
-rw-r--r--src/qtsegmentcontrol.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qtsegmentcontrol.cpp b/src/qtsegmentcontrol.cpp
index a1e7ce4..fd28fa8 100644
--- a/src/qtsegmentcontrol.cpp
+++ b/src/qtsegmentcontrol.cpp
@@ -84,7 +84,8 @@ protected:
static void drawSegmentControlSegmentSegment(const QStyleOption *option, QPainter *painter, QWidget *)
{
- // ### Change to qstyleoption_cast!
+#ifdef Q_WS_MAC
+ // ### Change to qstyleoption_cast!
if (const QtStyleOptionSegmentControlSegment *segment
= static_cast<const QtStyleOptionSegmentControlSegment *>(option)) {
CGContextRef cg = qt_mac_cg_context(painter->device());
@@ -101,6 +102,9 @@ static void drawSegmentControlSegmentSegment(const QStyleOption *option, QPainte
HIThemeDrawSegment(&hirect, &sgi, cg, kHIThemeOrientationNormal);
CFRelease(cg);
}
+#else
+ painter->drawRect(option->rect, QColor(0, 255, 0, 135));
+#endif
}
static QSize segmentSizeFromContents(const QStyleOption *option, const QSize &contentSize)
@@ -127,12 +131,8 @@ static void drawSegmentControlSegmentLabel(const QStyleOption *option, QPainter
static void drawSegmentControlSegment(const QStyleOption *option,
QPainter *painter, QWidget *widget)
{
-#ifndef Q_WS_MAC
- painter->fillRect(option->rect, QColor(255, 0, 0, 135));
-#else
drawSegmentControlSegmentSegment(option, painter, widget);
drawSegmentControlSegmentLabel(option, painter, widget);
-#endif
}
void QtSegmentControlPrivate::layoutSegments()