summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFillMode.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFillMode.qml')
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFillMode.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFillMode.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFillMode.qml
index f623aa412..b114d5bb4 100644
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFillMode.qml
+++ b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFillMode.qml
@@ -54,16 +54,16 @@ Scene {
verticalCenter: parent.verticalCenter
margins: parent.margins
}
- width: 150
+ width: Math.max(parent.width, parent.height) / 5
height: root.buttonHeight
text: "PreserveAspectFit"
onClicked: {
if (!content.dummy) {
var video = content.contentItem()
- if (video.fillMode == VideoOutput.Stretch) {
+ if (video.fillMode === VideoOutput.Stretch) {
video.fillMode = VideoOutput.PreserveAspectFit
text = "PreserveAspectFit"
- } else if (video.fillMode == VideoOutput.PreserveAspectFit) {
+ } else if (video.fillMode === VideoOutput.PreserveAspectFit) {
video.fillMode = VideoOutput.PreserveAspectCrop
text = "PreserveAspectCrop"
} else {