summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/controls/TableView.qml14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml
index 329976c5..827b1749 100644
--- a/src/controls/TableView.qml
+++ b/src/controls/TableView.qml
@@ -651,12 +651,22 @@ ScrollView {
// Fills extra rows with alternate color
Column {
id: rowfiller
- property int rowHeight: count ? listView.contentHeight/count : height
+ Loader {
+ id: rowSizeItem
+ sourceComponent: root.rowDelegate
+ visible: false
+ property QtObject styleData: QtObject {
+ property bool alternate: false
+ property bool selected: false
+ property bool hasActiveFocus: false
+ }
+ }
+ property int rowHeight: rowSizeItem.implicitHeight
property int paddedRowCount: height/rowHeight
property int count: listView.count
y: listView.contentHeight
width: parent.width
- visible: listView.contentHeight > 0 && alternatingRowColors
+ visible: alternatingRowColors
height: viewport.height - listView.contentHeight
Repeater {
model: visible ? parent.paddedRowCount : 0