consider dialog margins for the size
This commit is contained in:
parent
d17002f04e
commit
115aab2242
@ -48,8 +48,8 @@ import "." 0.1
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
width: theme.defaultFont.mSize.width * 40
|
width: Math.max(buttonItem.childrenRect.width + dialog.margins.left + dialog.margins.right, theme.defaultFont.mSize.width * 40)
|
||||||
height: titleBar.childrenRect.height + contentItem.childrenRect.height + buttonItem.childrenRect.height + 8
|
height: titleBar.childrenRect.height + contentItem.childrenRect.height + buttonItem.childrenRect.height + 8 + dialog.margins.top + dialog.margins.bottom
|
||||||
|
|
||||||
property alias title: titleBar.children
|
property alias title: titleBar.children
|
||||||
property alias content: contentItem.children
|
property alias content: contentItem.children
|
||||||
@ -136,7 +136,6 @@ Item {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: titleBar
|
id: titleBar
|
||||||
|
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
@ -149,7 +148,7 @@ Item {
|
|||||||
id: contentItem
|
id: contentItem
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
onChildrenRectChanged: mainItem.width = Math.max(childrenRect.width, buttonItem.childrenRect.width)
|
onChildrenRectChanged: mainItem.width = Math.max(childrenRect.width, buttonItem.childrenRect.width) + dialog.margins.left + dialog.margins.right
|
||||||
anchors {
|
anchors {
|
||||||
top: titleBar.bottom
|
top: titleBar.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
|
Loading…
Reference in New Issue
Block a user