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:
parent
886d5c7124
commit
0dd6b99014
@ -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);
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user