mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -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 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 : ""
|
property string activeMachineId: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.id : ""
|
||||||
delegate: Loader
|
delegate: Loader
|
||||||
{
|
{
|
||||||
id: delegate
|
id: delegate
|
||||||
|
|
||||||
width: scrollView.width
|
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 } }
|
Behavior on height { NumberAnimation { duration: 100 } }
|
||||||
opacity: provider.properties.enabled === "True" ? 1 : 0
|
opacity: provider.properties.enabled === "True" ? 1 : 0
|
||||||
Behavior on opacity { NumberAnimation { duration: 100 } }
|
Behavior on opacity { NumberAnimation { duration: 100 } }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue