From 213b58ec4401170813801a26708c87032196a5d9 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 11 Jun 2009 18:49:23 +0200 Subject: Using QPixmap as paint device. Makes more sense in this case. At least on X11 and MacOS. Reviewed-by: Ariya Hidayat --- src/gui/styles/qs60style_simulated.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp index 362e29c..684f232 100644 --- a/src/gui/styles/qs60style_simulated.cpp +++ b/src/gui/styles/qs60style_simulated.cpp @@ -274,7 +274,7 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size, const QRect leftRect = rightRect.translated(cornerWidth - rectWidth, 0); const QRect centerRect = drawOnlyCenter ? rect : rect.adjusted(cornerWidth, cornerWidth, -cornerWidth, -cornerWidth); - QImage result(size, QImage::Format_ARGB32); + QPixmap result(size); result.fill(Qt::transparent); QPainter painter(&result); @@ -303,7 +303,7 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size, drawPart(center, &painter, centerRect, flags); #endif - return QPixmap::fromImage(result); + return result; } void QS60StylePrivate::setStyleProperty_specific(const char *name, const QVariant &value) -- cgit v0.12