mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 01:28:58 +08:00
Precompute delegate height for settingview
Speed up the rendering of settingitems a bit
This commit is contained in:
parent
b7296dd700
commit
c5d5cd2c59
@ -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…
x
Reference in New Issue
Block a user