proper image scaling with screen scaling (#3036, #3037)

This commit is contained in:
end-4
2026-05-04 09:20:12 +02:00
parent c652d2a7f3
commit f992294ec2
16 changed files with 20 additions and 41 deletions
@@ -1,5 +1,6 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Qt5Compat.GraphicalEffects
import qs.modules.common
import qs.modules.common.functions
@@ -71,8 +72,10 @@ StyledOverlayWidget {
anchors.centerIn: parent
width: root.imageWidth * root.scaleFactor
height: root.imageHeight * root.scaleFactor
sourceSize.width: width
sourceSize.height: height
sourceSize: {
const dpr = (QsWindow.window as QsWindow)?.devicePixelRatio ?? 1;
return Qt.size(width * dpr, height * dpr);
}
playing: visible
asynchronous: true