Proof-of-concept QML test
WIP, do not review yet
This commit is contained in:
@@ -43,6 +43,8 @@ Item {
|
||||
*/
|
||||
property var contentMaxHeight: undefined
|
||||
|
||||
readonly property alias _private: _private
|
||||
|
||||
implicitWidth: mediaSizeHelper.currentSize.width
|
||||
implicitHeight: mediaSizeHelper.currentSize.height
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user