From 4a1799db768f200671b7abfc718422a70ff58109 Mon Sep 17 00:00:00 2001 From: jolavillette Date: Thu, 25 Jun 2026 09:24:47 +0200 Subject: [PATCH] fix(voip): keep aspect ratio in camera preview The self-view preview in Preferences/VOIP scaled camera frames into the display widget with Qt::IgnoreAspectRatio, forcing them into a 4:3 box. Non-4:3 cameras (e.g. 16:9) were therefore stretched vertically. Use Qt::KeepAspectRatio, matching the sibling showFrameOff() which already scales the placeholder icon correctly. Co-Authored-By: Claude Opus 4.8 (1M context) --- plugins/VOIP/gui/QVideoDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/VOIP/gui/QVideoDevice.cpp b/plugins/VOIP/gui/QVideoDevice.cpp index fb81b84e2..92d6b6da7 100644 --- a/plugins/VOIP/gui/QVideoDevice.cpp +++ b/plugins/VOIP/gui/QVideoDevice.cpp @@ -232,6 +232,6 @@ void QVideoOutputDevice::showFrame(const QImage& img) #ifdef DEBUG_QVIDEODEVICE std::cerr << "img.size = " << img.width() << " x " << img.height() << std::endl; #endif - setPixmap(QPixmap::fromImage(img).scaled( QSize(height()*4/3,height()),Qt::IgnoreAspectRatio,Qt::SmoothTransformation)) ; + setPixmap(QPixmap::fromImage(img).scaled( QSize(height()*4/3,height()),Qt::KeepAspectRatio,Qt::SmoothTransformation)) ; }