mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 18:55:59 +08:00
Link anchors differently
Once this is in a scroll view, the width of the parent box isn't fixed any more. We'd have a lot of binding loops. So now this linking is not dependent on the parent width any more but rather on the theme sizes. Contributes to issue CURA-4148.
This commit is contained in:
parent
831a91afff
commit
95ba4b9368
@ -31,7 +31,7 @@ Item
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||
width: base.width * .45 - UM.Theme.getSize("sidebar_margin").width
|
||||
width: UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width
|
||||
height: childrenRect.height
|
||||
|
||||
Text
|
||||
@ -53,7 +53,7 @@ Item
|
||||
id: infillCellRight
|
||||
|
||||
height: childrenRect.height;
|
||||
width: base.width * .55
|
||||
width: UM.Theme.getSize("sidebar").width * .55
|
||||
|
||||
spacing: UM.Theme.getSize("sidebar_margin").width
|
||||
|
||||
@ -248,22 +248,12 @@ Item
|
||||
}
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: helpersCell
|
||||
anchors.top: infillCellRight.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: childrenRect.height
|
||||
|
||||
Text
|
||||
{
|
||||
id: enableSupportLabel
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.verticalCenter: enableSupportCheckBox.verticalCenter
|
||||
width: parent.width * .45 - 3 * UM.Theme.getSize("sidebar_margin").width
|
||||
text: catalog.i18nc("@label", "Generate Support");
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
@ -274,8 +264,9 @@ Item
|
||||
id: enableSupportCheckBox
|
||||
property alias _hovered: enableSupportMouseArea.containsMouse
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: enableSupportLabel.right
|
||||
anchors.top: infillCellRight.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2
|
||||
anchors.left: infillCellRight.left
|
||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
|
||||
style: UM.Theme.styles.checkbox;
|
||||
@ -313,7 +304,6 @@ Item
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.verticalCenter: supportExtruderCombobox.verticalCenter
|
||||
width: parent.width * .45 - 3 * UM.Theme.getSize("sidebar_margin").width
|
||||
text: catalog.i18nc("@label", "Support Extruder");
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
@ -351,9 +341,9 @@ Item
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
anchors.left: supportExtruderLabel.right
|
||||
anchors.left: infillCellRight.left
|
||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
width: parent.width * .55
|
||||
width: UM.Theme.getSize("sidebar").width * .55
|
||||
height:
|
||||
{
|
||||
if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1))
|
||||
@ -412,7 +402,6 @@ Item
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.verticalCenter: adhesionCheckBox.verticalCenter
|
||||
width: parent.width * .45 - 3 * UM.Theme.getSize("sidebar_margin").width
|
||||
text: catalog.i18nc("@label", "Build Plate Adhesion");
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
@ -426,7 +415,7 @@ Item
|
||||
|
||||
anchors.top: supportExtruderCombobox.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2
|
||||
anchors.left: adhesionHelperLabel.right
|
||||
anchors.left: infillCellRight.left
|
||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
|
||||
//: Setting enable printing build-plate adhesion helper checkbox
|
||||
@ -481,7 +470,6 @@ Item
|
||||
id: extruders
|
||||
onModelChanged: populateExtruderModel()
|
||||
}
|
||||
}
|
||||
|
||||
function populateExtruderModel()
|
||||
{
|
||||
@ -499,7 +487,7 @@ Item
|
||||
Item
|
||||
{
|
||||
id: tipsCell
|
||||
anchors.top: helpersCell.bottom
|
||||
anchors.top: adhesionCheckBox.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2
|
||||
anchors.left: parent.left
|
||||
width: parent.width
|
||||
|
Loading…
x
Reference in New Issue
Block a user