diff options
Diffstat (limited to 'src/plugins/styles/windowsvista/qwindowsxpstyle.cpp')
-rw-r--r-- | src/plugins/styles/windowsvista/qwindowsxpstyle.cpp | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp index 4c982c14f4..0c28a9900d 100644 --- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp +++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp @@ -760,10 +760,8 @@ static QRegion scaleRegion(const QRegion ®ion, qreal factor) { if (region.isEmpty() || qFuzzyCompare(factor, qreal(1))) return region; - if (region.rectCount() == 1) - return QRegion(scaleRect(QRectF(region.boundingRect()), factor).toRect()); QRegion result; - foreach (const QRect &rect, region.rects()) + for (const QRect &rect : region) result += QRectF(QPointF(rect.topLeft()) * factor, QSizeF(rect.size() * factor)).toRect(); return result; } @@ -3963,6 +3961,40 @@ QWindowsXPStyle::QWindowsXPStyle(QWindowsXPStylePrivate &dd) : QWindowsStyle(dd) { } +#ifndef QT_NO_DEBUG_STREAM +QDebug operator<<(QDebug d, const XPThemeData &t) +{ + QDebugStateSaver saver(d); + d.nospace(); + d << "XPThemeData(" << t.widget << ", theme=#" << t.theme << ", " << t.htheme + << ", partId=" << t.partId << ", stateId=" << t.stateId << ", rect=" << t.rect + << ", mirrorHorizontally=" << t.mirrorHorizontally << ", mirrorVertically=" + << t.mirrorVertically << ", noBorder=" << t.noBorder << ", noContent=" << t.noContent + << ", rotate=" << t.rotate << ')'; + return d; +} + +QDebug operator<<(QDebug d, const ThemeMapKey &k) +{ + QDebugStateSaver saver(d); + d.nospace(); + d << "ThemeMapKey(theme=#" << k.theme + << ", partId=" << k.partId << ", stateId=" << k.stateId + << ", noBorder=" << k.noBorder << ", noContent=" << k.noContent << ')'; + return d; +} + +QDebug operator<<(QDebug d, const ThemeMapData &td) +{ + QDebugStateSaver saver(d); + d.nospace(); + d << "ThemeMapData(alphaType=" << td.alphaType + << ", dataValid=" << td.dataValid << ", partIsTransparent=" << td.partIsTransparent + << ", hasAlphaChannel=" << td.hasAlphaChannel << ", wasAlphaSwapped=" << td.wasAlphaSwapped + << ", hadInvalidAlpha=" << td.hadInvalidAlpha << ')'; + return d; +} +#endif // QT_NO_DEBUG_STREAM // Debugging code ---------------------------------------------------------------------[ START ]--- // The code for this point on is not compiled by default, but only used as assisting |