From a69bcc4827cd78abab4e2a273558ae1d61ff646d Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 26 Dec 2009 16:19:38 +0000 Subject: [PATCH] try harder to enforce a minimum size of 16x16 svn path=/trunk/KDE/kdelibs/; revision=1066278 --- private/applethandle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/private/applethandle.cpp b/private/applethandle.cpp index 70e0eb292..1f56f5d7d 100644 --- a/private/applethandle.cpp +++ b/private/applethandle.cpp @@ -630,7 +630,7 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event) QSizeF min = m_applet->minimumSize(); QSizeF max = m_applet->maximumSize(); - if (min.isEmpty()) { + if (min.width() < KIconLoader::SizeSmall || min.height() < KIconLoader::SizeSmall) { min = m_applet->effectiveSizeHint(Qt::MinimumSize); } @@ -640,7 +640,7 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event) // If the applet doesn't have a minimum size, calculate based on a // minimum content area size of 16x16 (KIconLoader::SizeSmall) - if (min.isEmpty()) { + if (min.width() < KIconLoader::SizeSmall || min.height() < KIconLoader::SizeSmall) { min = m_applet->boundingRect().size() - m_applet->contentsRect().size(); min = QSizeF(KIconLoader::SizeSmall, KIconLoader::SizeSmall); }