Convert TimelineDelegate to cpp
There are 2 main reason for doing this: 1. Because I can, I wanted to see if I could do it 2. It gets rid of the janky qml re parenting stuff so should be faster.
This commit is contained in:
@@ -8,6 +8,8 @@ import QtQuick.Layouts
|
||||
import Qt.labs.qmlmodels
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
TimelineDelegate {
|
||||
id: root
|
||||
|
||||
@@ -16,6 +18,11 @@ TimelineDelegate {
|
||||
temporaryHighlightTimer.start();
|
||||
}
|
||||
|
||||
width: parent?.width
|
||||
rightPadding: Config.compactLayout && root.ListView.view.width >= Kirigami.Units.gridUnit * 20 ? Kirigami.Units.gridUnit * 2 + Kirigami.Units.largeSpacing : Kirigami.Units.largeSpacing
|
||||
|
||||
alwaysFillWidth: Config.compactLayout
|
||||
|
||||
contentItem: QQC2.ItemDelegate {
|
||||
padding: Kirigami.Units.largeSpacing
|
||||
topInset: Kirigami.Units.largeSpacing
|
||||
|
||||
Reference in New Issue
Block a user