src/gui/styles/qstylesheetstyle.cpp
branchRCL_3
changeset 8 3f74d0d4af4c
parent 4 3b1da2848fc7
child 14 c0432d11811c
--- a/src/gui/styles/qstylesheetstyle.cpp	Mon Mar 15 12:43:09 2010 +0200
+++ b/src/gui/styles/qstylesheetstyle.cpp	Thu Apr 08 14:19:33 2010 +0300
@@ -1125,6 +1125,7 @@
 
 void QRenderRule::drawBorderImage(QPainter *p, const QRect& rect)
 {
+    setClip(p, rect);
     static const Qt::TileRule tileMode2TileRule[] = {
         Qt::StretchTile, Qt::RoundTile, Qt::StretchTile, Qt::RepeatTile, Qt::StretchTile };
 
@@ -1142,6 +1143,7 @@
                       QRect(QPoint(), borderImageData->pixmap.size()), sourceMargins,
                       QTileRules(tileMode2TileRule[borderImageData->horizStretch], tileMode2TileRule[borderImageData->vertStretch]));
     p->setRenderHint(QPainter::SmoothPixmapTransform, wasSmoothPixmapTransform);
+    unsetClip(p);
 }
 
 QRect QRenderRule::originRect(const QRect &rect, Origin origin) const
@@ -5741,6 +5743,13 @@
         return positionRect(w, subRule, subRule2, pe, opt->rect, opt->direction);
                                    }
 
+#ifndef QT_NO_TOOLBAR
+    case SE_ToolBarHandle:
+        if (hasStyleRule(w, PseudoElement_ToolBarHandle))
+            return ParentStyle::subElementRect(se, opt, w);
+        break;
+#endif //QT_NO_TOOLBAR
+
     default:
         break;
     }