Proof-of-concept QML test

WIP, do not review yet
This commit is contained in:
Joshua Goins
2025-08-05 19:17:37 -04:00
parent 45c5806c5a
commit a190c45988
7 changed files with 183 additions and 1 deletions

View File

@@ -43,6 +43,8 @@ Item {
*/
property var contentMaxHeight: undefined
readonly property alias _private: _private
implicitWidth: mediaSizeHelper.currentSize.width
implicitHeight: mediaSizeHelper.currentSize.height

View File

@@ -150,6 +150,10 @@ QSize MediaSizeHelper::currentSize() const
if (height > heightLimit()) {
return QSize(qRound(heightLimit() * aspectRatio()), qRound(heightLimit()));
}
// TODO: NO
if (qIsNaN(width) || qIsNaN(height)) {
return {};
}
return QSize(qRound(width), qRound(height));
} else {
qreal height = std::min(heightLimit(), resolvedMediaHeight());