From 77d91a4304851c128236a701c1b47bcc4e6ef0b0 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 20 Feb 2013 19:31:06 +0100 Subject: [PATCH] sync sizes also on the other way --- .../testcomponentsapplet/contents/ui/DialogsPage.qml | 4 ++-- qmlpackages/desktop/contents/ui/CompactApplet.qml | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/applets/testcomponentsapplet/contents/ui/DialogsPage.qml b/applets/testcomponentsapplet/contents/ui/DialogsPage.qml index 2db0e38dc..6b6c24b2c 100644 --- a/applets/testcomponentsapplet/contents/ui/DialogsPage.qml +++ b/applets/testcomponentsapplet/contents/ui/DialogsPage.qml @@ -83,10 +83,10 @@ PlasmaComponents.Page { PlasmaCore.Dialog { id: pcDialog windowFlags: Qt.Popup - mainItem: dContent2 + //mainItem: dContent2 color: Qt.rgba(0,0,0,0) - DialogContent { + mainItem: DialogContent { id: dContent2 onCloseMe: pcDialog.visible = false } diff --git a/qmlpackages/desktop/contents/ui/CompactApplet.qml b/qmlpackages/desktop/contents/ui/CompactApplet.qml index 3ef02ae90..6e7e842e7 100644 --- a/qmlpackages/desktop/contents/ui/CompactApplet.qml +++ b/qmlpackages/desktop/contents/ui/CompactApplet.qml @@ -49,14 +49,12 @@ Item { plasmoid.expanded = false } } - //onWidthChanged: appletParent.width = width - //onHeightChanged:appletParent.height = height - mainItem: appletParent - Rectangle { + + mainItem: Rectangle { id: appletParent - radius: 10 - width: 200//applet.implicitWidth - height: 200//applet.implicitHeight + radius: 5 + width: applet && applet.implicitWidth > 0 ? applet.implicitWidth : theme.defaultFont.mSize.width * 35 + height: applet && applet.implicitHeight > 0 ? applet.implicitHeight : theme.defaultFont.mSize.height * 25 onWidthChanged: applet.width = width onHeightChanged: applet.height = height }