mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +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 {
|
delegate: Rectangle {
|
||||||
property variant modelData: model
|
property variant modelData: model
|
||||||
|
|
||||||
|
ListView.delayRemove: true
|
||||||
|
|
||||||
color: model.index == popup.currentIndex ? Nheko.colors.highlight : Nheko.colors.base
|
color: model.index == popup.currentIndex ? Nheko.colors.highlight : Nheko.colors.base
|
||||||
height: chooser.child.implicitHeight + 2 * popup.rowMargin
|
height: chooser.child.implicitHeight + 2 * popup.rowMargin
|
||||||
implicitWidth: fullWidth ? ListView.view.width : chooser.child.implicitWidth + 4
|
implicitWidth: fullWidth ? ListView.view.width : chooser.child.implicitWidth + 4
|
||||||
|
|
|
@ -449,6 +449,7 @@ Item {
|
||||||
anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined
|
anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined
|
||||||
width: chat.delegateMaxWidth
|
width: chat.delegateMaxWidth
|
||||||
height: section.active ? section.height + timelinerow.height : timelinerow.height
|
height: section.active ? section.height + timelinerow.height : timelinerow.height
|
||||||
|
ListView.delayRemove: true
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: section
|
id: section
|
||||||
|
|
Loading…
Reference in a new issue