mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Height based on implicitHeight/implicitWidth now.
Removed redundant code. CURA-8640
This commit is contained in:
parent
804a607b75
commit
3dc67f387f
2 changed files with 2 additions and 25 deletions
|
@ -305,28 +305,6 @@ Item
|
|||
padding: UM.Theme.getSize("default_margin").width
|
||||
|
||||
contentItem: Item {}
|
||||
|
||||
onContentItemChanged:
|
||||
{
|
||||
// Since we want the size of the content to be set by the size of the content,
|
||||
// we need to do it like this.
|
||||
content.width = contentItem.width + 2 * content.padding
|
||||
content.height = contentItem.height + 2 * content.padding
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DO NOT MOVE UP IN THE CODE: This connection has to be here, after the definition of the content item.
|
||||
// Apparently the order in which these are handled matters and so the height is correctly updated if this is here.
|
||||
Connections
|
||||
{
|
||||
// Since it could be that the content is dynamically populated, we should also take these changes into account.
|
||||
target: content.contentItem
|
||||
function onWidthChanged() { content.width = content.contentItem.width + 2 * content.padding }
|
||||
function onHeightChanged()
|
||||
{
|
||||
content.height = content.contentItem.height + 2 * content.padding
|
||||
contentContainer.height = contentHeader.height + content.height
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,9 +15,8 @@ Item
|
|||
id: content
|
||||
|
||||
property int absoluteMinimumHeight: 200 * screenScaleFactor
|
||||
|
||||
width: UM.Theme.getSize("print_setup_widget").width - 2 * UM.Theme.getSize("default_margin").width
|
||||
height: contents.height + buttonRow.height
|
||||
implicitWidth: UM.Theme.getSize("print_setup_widget").width - 2 * UM.Theme.getSize("default_margin").width
|
||||
implicitHeight: contents.height + buttonRow.height
|
||||
|
||||
enum Mode
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue