From e452178adb019b8818e3306abc875f6d267c46d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 15 Jan 2022 11:54:40 +0100 Subject: [PATCH] Log the device pixel ratio used while rendering --- YACReader/viewer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/YACReader/viewer.cpp b/YACReader/viewer.cpp index bcf34b00..79a833d0 100644 --- a/YACReader/viewer.cpp +++ b/YACReader/viewer.cpp @@ -22,6 +22,8 @@ #include +#include + Viewer::Viewer(QWidget *parent) : QScrollArea(parent), fullscreen(false), @@ -363,6 +365,8 @@ void Viewer::updateContentSize() // apply scaling content->resize(pagefit); + QLOG_INFO() << "Device pixel ratio used while rendering: " << devicePixelRatioF(); + // TODO: updtateContentSize should only scale the pixmap once if (devicePixelRatioF() > 1) // only in HDPI displays {