backport the reverting of the size hint

svn path=/branches/KDE/4.4/kdelibs/; revision=1071249
This commit is contained in:
Marco Martin 2010-01-07 19:22:46 +00:00
parent e77ea715c6
commit 164187c4e2

View File

@ -436,17 +436,6 @@ QSizeF ToolButton::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
{ {
QSizeF hint = QGraphicsProxyWidget::sizeHint(which, constraint); QSizeF hint = QGraphicsProxyWidget::sizeHint(which, constraint);
if (hint.isEmpty()) {
return hint;
}
//replace the native margin with the Svg one
QStyleOption option;
option.initFrom(nativeWidget());
int nativeMargin = nativeWidget()->style()->pixelMetric(QStyle::PM_ButtonMargin, &option, nativeWidget());
qreal left, top, right, bottom;
d->background->getMargins(left, top, right, bottom);
hint = hint - QSize(nativeMargin, nativeMargin) + QSize(left+right, top+bottom);
return hint; return hint;
} }