constrained square makes sense for vertical but not horizontal panels

BUG:282706
This commit is contained in:
Aaron Seigo 2011-12-02 17:30:59 +01:00
parent c3cb35739c
commit e0cd24f83a

View File

@ -2520,7 +2520,7 @@ QSizeF Applet::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
}
} else if (d->aspectRatioMode == Plasma::ConstrainedSquare) {
//enforce a size not wider than tall
if (ff == Horizontal && (which == Qt::MaximumSize || size().height() <= KIconLoader::SizeLarge)) {
if (ff == Horizontal) {
hint.setWidth(size().height());
//enforce a size not taller than wide
} else if (ff == Vertical && (which == Qt::MaximumSize || size().width() <= KIconLoader::SizeLarge)) {