Commit ea84e5c1 authored by Aleksei Nikiforov's avatar Aleksei Nikiforov Committed by Nate Graham
Browse files

Replace Repeater with ListView for task group list

Unlike Repeater ListView loads only visible items.
This behaviour leads to huge performance improvement.
ListView also requires to set width and height explicitly.

One remaining issue is time of displaying tooltips.
Tooltips are displayed only for short amount of time.
With Repeater this timer starts after tooltip is displayed.
With ListView it looks like timer starts while ListView is preparing to display,
which may lead to situation when timer fires before tooltip is displayed,
thus when tooltip is ready, it is briefly displayed and immediately hidden again.

BUG: 433907
parent 8b1e1a09
......@@ -101,24 +101,20 @@ PlasmaExtras.ScrollArea {
Component {
id: groupToolTip
Grid {
rows: !isVerticalPanel
columns: isVerticalPanel
flow: isVerticalPanel ? Grid.TopToBottom : Grid.LeftToRight
spacing: PlasmaCore.Units.largeSpacing
Repeater {
id: groupRepeater
model: DelegateModel {
model: toolTipDelegate.rootIndex ? tasksModel : null
ListView {
implicitHeight: contentItem.childrenRect.height
implicitWidth: contentItem.childrenRect.width
model: DelegateModel {
model: toolTipDelegate.rootIndex ? tasksModel : null
rootIndex: toolTipDelegate.rootIndex
rootIndex: toolTipDelegate.rootIndex
delegate: ToolTipInstance {
submodelIndex: tasksModel.makeModelIndex(toolTipDelegate.rootIndex.row, index)
}
delegate: ToolTipInstance {
submodelIndex: tasksModel.makeModelIndex(toolTipDelegate.rootIndex.row, index)
}
}
orientation: isVerticalPanel ? ListView.Vertical : ListView.Horizontal
spacing: PlasmaCore.Units.largeSpacing
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment