backport icon sizing fix
svn path=/branches/KDE/4.4/kdelibs/; revision=1071367
This commit is contained in:
parent
164187c4e2
commit
f3a2a662ca
@ -546,9 +546,12 @@ void IconWidgetPrivate::layoutIcons(const QStyleOptionGraphicsItem *option)
|
|||||||
//if there is text resize the icon in order to make room for the text
|
//if there is text resize the icon in order to make room for the text
|
||||||
if (text.isEmpty() && infoText.isEmpty()) {
|
if (text.isEmpty() && infoText.isEmpty()) {
|
||||||
// with no text, we just take up the whole geometry
|
// with no text, we just take up the whole geometry
|
||||||
iconWidth = currentSize.height() -
|
iconWidth = qMin(currentSize.height() -
|
||||||
horizontalMargin[IconWidgetPrivate::IconMargin].left -
|
horizontalMargin[IconWidgetPrivate::IconMargin].left -
|
||||||
horizontalMargin[IconWidgetPrivate::IconMargin].right;
|
horizontalMargin[IconWidgetPrivate::IconMargin].right,
|
||||||
|
currentSize.width() -
|
||||||
|
horizontalMargin[IconWidgetPrivate::IconMargin].left -
|
||||||
|
horizontalMargin[IconWidgetPrivate::IconMargin].right);
|
||||||
} else {
|
} else {
|
||||||
iconWidth = currentSize.height() -
|
iconWidth = currentSize.height() -
|
||||||
verticalMargin[IconWidgetPrivate::IconMargin].top -
|
verticalMargin[IconWidgetPrivate::IconMargin].top -
|
||||||
|
Loading…
x
Reference in New Issue
Block a user