mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Precompute delegate height for settingview
Speed up the rendering of settingitems a bit
This commit is contained in:
parent
b7296dd700
commit
c5d5cd2c59
1 changed files with 2 additions and 1 deletions
|
@ -246,13 +246,14 @@ Item
|
|||
}
|
||||
|
||||
property int indexWithFocus: -1
|
||||
property double delegateHeight: UM.Theme.getSize("section").height + 2 * UM.Theme.getSize("default_lining").height
|
||||
property string activeMachineId: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.id : ""
|
||||
delegate: Loader
|
||||
{
|
||||
id: delegate
|
||||
|
||||
width: scrollView.width
|
||||
height: provider.properties.enabled === "True" ? UM.Theme.getSize("section").height + 2 * UM.Theme.getSize("default_lining").height : 0
|
||||
height: provider.properties.enabled === "True" ? contents.delegateHeight: 0
|
||||
Behavior on height { NumberAnimation { duration: 100 } }
|
||||
opacity: provider.properties.enabled === "True" ? 1 : 0
|
||||
Behavior on opacity { NumberAnimation { duration: 100 } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue