From b556753ecd86c7d418359ce4eee0d7f9edc238f3 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Fri, 2 Dec 2011 17:30:59 +0100 Subject: [PATCH] constrained square makes sense for vertical but not horizontal panels BUG:282706 --- applet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applet.cpp b/applet.cpp index 9598a9bd2..0731bd287 100644 --- a/applet.cpp +++ b/applet.cpp @@ -2114,7 +2114,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)) {