backport the reverting of the size hint
svn path=/branches/KDE/4.4/kdelibs/; revision=1071249
This commit is contained in:
parent
e77ea715c6
commit
164187c4e2
@ -436,17 +436,6 @@ QSizeF ToolButton::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user