[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/quicklaunch
From:       Lukas Appelhans <l.appelhans () gmx ! de>
Date:       2009-03-22 16:19:03
Message-ID: 1237738743.270546.20968.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 942826 by lappelhans:

Fix the placing, why did it move offset before sometimes... well... now it's fixed =)


 M  +5 -2      quicklaunchIcon.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/quicklaunch/quicklaunchIcon.cpp #942825:942826
@@ -63,10 +63,13 @@
     painter->setClipRect(option->rect);
     QRect rect = option->rect;
     rect.setSize(QSize(m_iconSize, m_iconSize));
-    rect.moveCenter(option->rect.center());
+    //rect.moveCenter(option->rect.center());
+    rect.moveCenter(QPoint(option->rect.width() / 2, option->rect.height() / 2));
+    //rect.setLeft((option->rect.width() - m_iconSize) / 2);
+    //rect.setTop((option->rect.height() - m_iconSize) / 2);
     //QStyleOptionGraphicsItem opt = *option;
     //opt.rect = rect;
-    kDebug() << "Paint to:" << rect;
+    kDebug() << "Paint to:" << rect << "Original rect was:" << option->rect;
 
     painter->drawPixmap(rect, icon().pixmap(m_iconSize));
     //IconWidget::paint(painter, &opt, widget);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic