[Panel-devel] KDE/kdebase/workspace/plasma/plasma

Matt Williams matt at milliams.com
Tue May 22 01:09:05 CEST 2007


SVN commit 667141 by milliams:

Fix the strange jumping around of parts of the clock face.
Since the translation is handled by the p->translate(..) command, Svg::paint() was using both the translation of the QPainter and of the matrix it was given (which was set from the translation of the QPainter). This was causing parts to move twice as far as they should. Now, a unit matrix is passed instead.
CCMAIL: panel-devel at kde.org

 M  +3 -3      clock.cpp  


--- trunk/KDE/kdebase/workspace/plasma/plasma/clock.cpp #667140:667141
@@ -78,13 +78,13 @@
     qreal minutes = 6.0 * m_time.minute() - 180;
     qreal hours = 30.0 * m_time.hour() - 180 + ((m_time.minute() / 59.0) * 30.0);
 
-    QMatrix matrix = p->worldMatrix();
+    QMatrix matrix;
     QRectF rrr(0, 0, 0, 0);
     QRectF boundRect = boundingRect();
     QSizeF boundSize = boundRect.size();
     //QSizeF clockSize = m_theme->elementSize("ClockFace");
     //kDebug() << "painting clock face at " << boundRect << endl;
-    m_theme->paint(p, boundRect, "ClockFace");
+    m_theme->paint(p, boundRect, "ClockFace", &matrix);
 
     p->save();
     p->translate(boundSize.height()/2, boundSize.width()/2);
@@ -131,7 +131,7 @@
                 (boundRect.height()/2) - fm.xHeight()*3, m_time.toString());
 
     m_theme->resize(boundSize);
-    m_theme->paint(p, boundRect, "Glass");
+    m_theme->paint(p, boundRect, "Glass", &matrix);
 }
 /*
 QVariant Clock::itemChange(GraphicsItemChange change, const QVariant &value)


More information about the Panel-devel mailing list