Fix foldout of the layerview panel being too short or too long

CURA-5829
This commit is contained in:
Jaime van Kessel 2018-11-07 16:30:52 +01:00
parent 2c59419dbb
commit f15d03d48c

View File

@ -19,7 +19,7 @@ Rectangle
width: UM.Theme.getSize("layerview_menu_size").width
height: viewSettings.collapsed ? layerViewTypesLabel.height + 2 * UM.Theme.getSize("default_margin").height : childrenRect.height
height: viewSettings.collapsed ? layerViewTypesLabel.height + 2 * UM.Theme.getSize("default_margin").height : childrenRect.height + 2 * UM.Theme.getSize("default_margin").height
Behavior on height { NumberAnimation { duration: 100 } }
@ -469,6 +469,13 @@ Rectangle
}
}
Item
{
// Another hack on top of the rotation of the gradient.
// Since we set the side of the panel to use childrenRect (and that uses the un-rotated height), add this
// wrapper item with the correct width & height so it doesn't get confused.
width: parent.width
height: feedrateGradient.visible || thicknessGradient.visible ? Math.round(UM.Theme.getSize("layerview_row").height * 1.5) : 0
// Gradient colors for feedrate
Rectangle
{ // In QML 5.9 can be changed by LinearGradient
@ -550,6 +557,7 @@ Rectangle
}
}
}
}
FontMetrics
{