SUMMARY KmPlot has no HiDPI support. STEPS TO REPRODUCE 1. Run "QT_SCALE_FACTOR=1.2 kmplot" 2. Add a graph by clicking on "Create > Cartesian Plot" and enter f(x)=x^2 OBSERVED RESULT Graph view is pixelated. Also reproducible with integral scale factors. EXPECTED RESULT Device pixel ratio is taken into account when creating the graph pixmap.
I have added QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); into main.cpp in 2019 trying to make HiDPI work, but it seems that this does not make any difference. Is there any other way to fix this on Qt level?
The pixmap that kmplot creates in view.cpp needs to be created with the same device ratio as the window, but rendering probably also needs to be adjusted. https://cgit.kde.org/kmplot.git/tree/kmplot/view.cpp#n2923 https://doc.qt.io/qt-5/qpixmap.html#setDevicePixelRatio
If somebody will want to test the possible fix someday: https://phabricator.kde.org/D29421
Git commit 97a1b21d12fdd8b0b0267a0d4ba28aa9eb674bdd by Yuri Chornoivan. Committed on 22/05/2020 at 08:58. Pushed by yurchor into branch 'master'. Get rid of pixelation on HiDPI displays Differential revision: https://phabricator.kde.org/D29421 FIXED-IN: 20.04.2 M +3 -1 kmplot/view.cpp https://invent.kde.org/education/kmplot/commit/97a1b21d12fdd8b0b0267a0d4ba28aa9eb674bdd
Git commit 5fa5072f644199b35fd956b98973bcb5e11bf23a by Yuri Chornoivan. Committed on 22/05/2020 at 09:00. Pushed by yurchor into branch 'release/20.04'. Get rid of pixelation on HiDPI displays Differential revision: https://phabricator.kde.org/D29421 FIXED-IN: 20.04.2 M +3 -1 kmplot/view.cpp https://invent.kde.org/education/kmplot/commit/5fa5072f644199b35fd956b98973bcb5e11bf23a