adjust sizing

This commit is contained in:
Marco Martin 2012-08-14 15:52:39 +02:00
parent db1096edce
commit 3989c9efe9
2 changed files with 13 additions and 10 deletions

View File

@ -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()),

View File

@ -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