add a bit of margin when is painted in svg

svn path=/trunk/KDE/kdelibs/; revision=987254
This commit is contained in:
Marco Martin 2009-06-25 18:31:24 +00:00
parent dbe1c02735
commit a64227049a

View File

@ -454,7 +454,15 @@ QSize Delegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &
size.setHeight(qMax(option.decorationSize.height(), qMax(size.height(), metrics.height() + subMetrics.ascent()) + 3) + 4);
// kDebug() << "size hint is" << size << (metrics.height() + subMetrics.ascent());
const bool useSvg = option.palette.color(QPalette::Base).alpha() == 0;
if (useSvg) {
qreal left, top, right, bottom;
d->svg->getMargins(left, top, right, bottom);
size += QSize(left+right, top+bottom);
} else {
size *= 1.1;
}
return size;
}