moment/src/qml/Base/HRepeater.qml
miruka d20ab5a348 Refactor EventContent
Use proper layouts and get rid of multiple annoyances/bugs like
text-wrapping randomly happening in the middle of words, background
rectangles being too large, a certain binding loop, etc
2019-09-19 15:49:29 -04:00

30 lines
599 B
QML

import QtQuick.Controls 2.12
import QtQuick 2.12
Repeater {
id: repeater
readonly property int childrenImplicitWidth: {
let total = 0
for (let i = 0; i < repeater.count; i++) {
let item = repeater.itemAt(i)
if (item && item.width) total += item.width
}
return total
}
readonly property int childrenWidth: {
let total = 0
for (let i = 0; i < repeater.count; i++) {
let item = repeater.itemAt(i)
if (item && item.width) total += item.width
}
return total
}
}