mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Delay some delegate removals to reduce CPU spent on recalculating sizes
This commit is contained in:
parent
696419c4f6
commit
ef31f67c32
2 changed files with 3 additions and 0 deletions
|
@ -125,6 +125,8 @@ Control {
|
|||
delegate: Rectangle {
|
||||
property variant modelData: model
|
||||
|
||||
ListView.delayRemove: true
|
||||
|
||||
color: model.index == popup.currentIndex ? Nheko.colors.highlight : Nheko.colors.base
|
||||
height: chooser.child.implicitHeight + 2 * popup.rowMargin
|
||||
implicitWidth: fullWidth ? ListView.view.width : chooser.child.implicitWidth + 4
|
||||
|
|
|
@ -449,6 +449,7 @@ Item {
|
|||
anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined
|
||||
width: chat.delegateMaxWidth
|
||||
height: section.active ? section.height + timelinerow.height : timelinerow.height
|
||||
ListView.delayRemove: true
|
||||
|
||||
Loader {
|
||||
id: section
|
||||
|
|
Loading…
Reference in a new issue