adjust sizing
This commit is contained in:
parent
db1096edce
commit
3989c9efe9
@ -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()),
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user