Patch from Qing Zhao: Similar to the PlatformScrollbar fixes, adjust the
authorstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jul 2007 15:15:15 +0000 (15:15 +0000)
committerstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jul 2007 15:15:15 +0000 (15:15 +0000)
painter to make the styler draw all subcontrols, and in this case the focus
rect, in the proper location

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@23984 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/qt/RenderThemeQt.cpp

index 89533f1cf439ea470489a4b506e4ba74a77bf6e9..8887eace8cd5fd6a29c0564cdc4e20b33908f378 100644 (file)
@@ -1,3 +1,14 @@
+2007-07-04  Qing Zhao  <qing@staikos.net>
+
+        Reviewed by George Staikos.
+
+        Similar to the PlatformScrollbar fixes, adjust the painter to make the
+        styler draw all subcontrols, and in this case the focus rect, in the
+        proper location
+
+        * platform/qt/RenderThemeQt.cpp:
+        (WebCore::RenderThemeQt::paintMenuList):
+
 2007-07-04  Mitz Pettel  <mitz@webkit.org>
 
         Reviewed by Maciej.
index 89928c4c5f76b81fae031f566c0bfa17420c6fec..81591f30d33e22ae99d7e74bb575df6328d7c5a9 100644 (file)
@@ -306,11 +306,17 @@ bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo
         return true;
 
     QStyleOptionComboBox opt;
+    EAppearance appearance = applyTheme(opt, o);
     opt.initFrom(widget);
-    opt.rect = r;
+    const QPoint topLeft = r.topLeft();
+    painter->translate(topLeft);
+    opt.rect.moveTo(QPoint(0,0));
+    opt.rect.setSize(r.size());
+
     opt.frame = false;
 
     style->drawComplexControl(QStyle::CC_ComboBox, &opt, painter, widget);
+    painter->translate(-topLeft);
     return false;
 }