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;
|
qreal left, top, right, bottom;
|
||||||
|
|
||||||
svg->getMargins(left, top, right, bottom);
|
svg->getMargins(left, top, right, bottom);
|
||||||
kWarning()<<top;
|
|
||||||
if (!text.isNull()) {
|
if (!text.isNull()) {
|
||||||
QFontMetricsF fm(QApplication::font());
|
QFontMetricsF fm(QApplication::font());
|
||||||
top += fm.height();kWarning()<<top;
|
top += fm.height();
|
||||||
}
|
}
|
||||||
|
|
||||||
q->setContentsMargins(left, top, right, bottom);
|
q->setContentsMargins(left, top, right, bottom);
|
||||||
|
@ -54,8 +54,9 @@ public:
|
|||||||
KMimeType::Ptr mime = KMimeType::findByPath(absImagePath);
|
KMimeType::Ptr mime = KMimeType::findByPath(absImagePath);
|
||||||
QPixmap pm(q->size().toSize());
|
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 = new Svg();
|
||||||
|
svg->setImagePath(imagePath);
|
||||||
QPainter p(&pm);
|
QPainter p(&pm);
|
||||||
svg->paint(&p, pm.rect());
|
svg->paint(&p, pm.rect());
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user