diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-19 12:12:14 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-19 12:18:07 (GMT) |
commit | 52ddc754b2426806fe9fa8737ce942dd234c76a5 (patch) | |
tree | 6e6dd01f8317baa1e56a55769b812f7db84610e6 /src/gui/widgets | |
parent | 8415ced03461fa4d3d9f915da0251760bd0a7202 (diff) | |
download | Qt-52ddc754b2426806fe9fa8737ce942dd234c76a5.zip Qt-52ddc754b2426806fe9fa8737ce942dd234c76a5.tar.gz Qt-52ddc754b2426806fe9fa8737ce942dd234c76a5.tar.bz2 |
Fixes: QCommandLinkButton crop large icons.
Task-number: QTBUG-1976
Reviewed-by: Gabi
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qcommandlinkbutton.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qcommandlinkbutton.cpp b/src/gui/widgets/qcommandlinkbutton.cpp index 9adf280..8f47f25 100644 --- a/src/gui/widgets/qcommandlinkbutton.cpp +++ b/src/gui/widgets/qcommandlinkbutton.cpp @@ -326,7 +326,8 @@ int QCommandLinkButton::heightForWidth(int width) const Q_D(const QCommandLinkButton); int heightWithoutDescription = d->descriptionOffset() + d->bottomMargin(); // find the width available for the description area - return heightWithoutDescription + d->descriptionHeight(width); + return qMax(heightWithoutDescription + d->descriptionHeight(width), + iconSize().height() + d->topMargin() + d->bottomMargin()); } /*! \reimp */ |