* better behavior with aspectRatioMode.

* one important line more than the diff in reviewboard
  needed to correctly restore the aspectratio.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=872574
This commit is contained in:
Alessandro Diaferia 2008-10-17 13:49:11 +00:00
parent 88137e4136
commit 7f51dcbf62

View File

@ -76,7 +76,12 @@ void PopupApplet::setPopupIcon(const QIcon &icon)
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
layout->setOrientation(Qt::Horizontal);
setAspectRatioMode(Plasma::ConstrainedSquare);
if (formFactor() == Plasma::Vertical || formFactor() == Plasma::Horizontal ) {
d->savedAspectRatio = aspectRatioMode();
setAspectRatioMode(Plasma::ConstrainedSquare);
}
setLayout(layout);
} else {
d->icon->setIcon(icon);