Plasma::Label should be able to actually display svgs from the theme

now
cleaning some juck debug stuff in label

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=841020
This commit is contained in:
Marco Martin 2008-08-02 13:01:16 +00:00
parent 886d5c7124
commit 0dd6b99014
2 changed files with 4 additions and 3 deletions

View File

@ -72,10 +72,10 @@ void FramePrivate::syncBorders()
qreal left, top, right, bottom;
svg->getMargins(left, top, right, bottom);
kWarning()<<top;
if (!text.isNull()) {
QFontMetricsF fm(QApplication::font());
top += fm.height();kWarning()<<top;
top += fm.height();
}
q->setContentsMargins(left, top, right, bottom);

View File

@ -54,8 +54,9 @@ public:
KMimeType::Ptr mime = KMimeType::findByPath(absImagePath);
QPixmap pm(q->size().toSize());
if (mime->is("image/svg+xml")) {
if (mime->is("image/svg+xml") || mime->is("application/x-gzip")) {
svg = new Svg();
svg->setImagePath(imagePath);
QPainter p(&pm);
svg->paint(&p, pm.rect());
} else {