backport the border fix when using svg
svn path=/branches/KDE/4.3/kdelibs/; revision=987299
This commit is contained in:
parent
89fc3cfa00
commit
225c322de6
10
delegate.cpp
10
delegate.cpp
@ -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());
|
||||
|
||||
size *= 1.1;
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user