From 1f633ad0a13441c398c5cbcd6950c9fe9df6da3f Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 17 Jun 2014 21:54:55 +0200 Subject: [PATCH] fix tooltip resize in folderview also, detach from old layouts if the mainitem changes --- src/declarativeimports/core/tooltipdialog.cpp | 3 ++- src/plasmaquick/dialog.cpp | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/declarativeimports/core/tooltipdialog.cpp b/src/declarativeimports/core/tooltipdialog.cpp index a522aaa0c..e62ed6e7f 100644 --- a/src/declarativeimports/core/tooltipdialog.cpp +++ b/src/declarativeimports/core/tooltipdialog.cpp @@ -127,8 +127,9 @@ void ToolTipDialog::adjustGeometry(const QRect &geom) default: break; } - + startGeom.setSize(geom.size()); + setGeometry(startGeom); m_animation->setStartValue(startGeom.topLeft()); m_animation->setEndValue(geom.topLeft()); diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp index 1d0907143..ab56ccc1d 100644 --- a/src/plasmaquick/dialog.cpp +++ b/src/plasmaquick/dialog.cpp @@ -521,6 +521,8 @@ void Dialog::setMainItem(QQuickItem *mainItem) //Extract the representation's Layout, if any QObject *layout = 0; + setMinimumSize(QSize(0, 0)); + setMaximumSize(QSize(DIALOGSIZE_MAX, DIALOGSIZE_MAX)); //Search a child that has the needed Layout properties //HACK: here we are not type safe, but is the only way to access to a pointer of Layout @@ -534,6 +536,9 @@ void Dialog::setMainItem(QQuickItem *mainItem) layout = child; } } + if (d->mainItemLayout) { + disconnect(d->mainItemLayout.data(), 0, this, 0); + } d->mainItemLayout = layout; if (layout) {