when the icon is horizontal and there is no text take the min between width and height as icon size.
among other things fixes the unhide arrow of the systray svn path=/trunk/KDE/kdelibs/; revision=1071365
This commit is contained in:
parent
35d8587114
commit
c1e947a768
@ -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 (text.isEmpty() && infoText.isEmpty()) {
|
||||
// with no text, we just take up the whole geometry
|
||||
iconWidth = currentSize.height() -
|
||||
horizontalMargin[IconWidgetPrivate::IconMargin].left -
|
||||
horizontalMargin[IconWidgetPrivate::IconMargin].right;
|
||||
iconWidth = qMin(currentSize.height() -
|
||||
horizontalMargin[IconWidgetPrivate::IconMargin].left -
|
||||
horizontalMargin[IconWidgetPrivate::IconMargin].right,
|
||||
currentSize.width() -
|
||||
horizontalMargin[IconWidgetPrivate::IconMargin].left -
|
||||
horizontalMargin[IconWidgetPrivate::IconMargin].right);
|
||||
} else {
|
||||
iconWidth = currentSize.height() -
|
||||
verticalMargin[IconWidgetPrivate::IconMargin].top -
|
||||
|
Loading…
Reference in New Issue
Block a user