From 3989c9efe94ec3b1b14fc5805710aa17d0c74c24 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 14 Aug 2012 15:52:39 +0200 Subject: [PATCH] adjust sizing --- .../plasmacomponents/fullscreenwindow.cpp | 2 +- .../platformcomponents/touch/Dialog.qml | 21 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/declarativeimports/plasmacomponents/fullscreenwindow.cpp b/declarativeimports/plasmacomponents/fullscreenwindow.cpp index 231b591d3..576840b38 100644 --- a/declarativeimports/plasmacomponents/fullscreenwindow.cpp +++ b/declarativeimports/plasmacomponents/fullscreenwindow.cpp @@ -266,7 +266,7 @@ void FullScreenWindow::syncMainItemToView() m_mainItem.data()->setProperty("height", m_view->height()); if (m_declarativeItemContainer) { - m_view->resize(m_declarativeItemContainer->size().toSize()); + m_declarativeItemContainer->resize(m_view->size()); m_view->setSceneRect(m_declarativeItemContainer->geometry()); } else { QRectF itemGeometry(QPointF(m_mainItem.data()->x(), m_mainItem.data()->y()), diff --git a/declarativeimports/plasmacomponents/platformcomponents/touch/Dialog.qml b/declarativeimports/plasmacomponents/platformcomponents/touch/Dialog.qml index cbc7a50db..5771059a9 100644 --- a/declarativeimports/plasmacomponents/platformcomponents/touch/Dialog.qml +++ b/declarativeimports/plasmacomponents/platformcomponents/touch/Dialog.qml @@ -47,8 +47,9 @@ import "." 0.1 Item { id: root - width: dialog.width - height: dialog.height + + width: theme.defaultFont.mSize.width * 40 + height: titleBar.childrenRect.height + contentItem.childrenRect.height + buttonItem.childrenRect.height + 8 property alias title: titleBar.children property alias content: contentItem.children @@ -110,9 +111,7 @@ Item { PlasmaCore.FrameSvgItem { id: dialog - width: mainItem.width + margins.left + margins.right - height: mainItem.height + margins.top + margins.bottom - anchors.centerIn: parent + anchors.fill: parent imagePath: "dialogs/background" state: "closed" @@ -121,10 +120,14 @@ Item { Item { id: mainItem - x: dialog.margins.left - y: dialog.margins.top - width: theme.defaultFont.mSize.width * 40 - height: titleBar.childrenRect.height + contentItem.childrenRect.height + buttonItem.childrenRect.height + 8 + anchors { + fill: parent + leftMargin: dialog.margins.left + topMargin: dialog.margins.top + rightMargin: dialog.margins.right + bottomMargin: dialog.margins.bottom + } + // Consume all key events that are not processed by children