https://bugs.kde.org/show_bug.cgi?id=362856

--- Comment #11 from Yi Yang <ahyan...@gmail.com> ---
By reading more documents and doing more experiments, things are now clear.

Qt 5.6 introduces a new option, called "High DPI Scaling", which is both
controllable form environment variables and application-wise options
(Qt::AA_EnableHighDpiScaling and Qt::AA_DisbleHighDpiScaling). This gives us
solution A: temporarily force Qt::AA_DisbleHighDpiScaling. This solution does
uglify menus and icons, though.

The more complex solution B needs more code refactoring. The key is to realize
that you are using "device-independent geometry" while the pixmap inside
QPixmap are using real physical values. You need to get this magical value from
QScreen::devicePixelRatio() and set them to QPixmap::setDevicePixelRatio().
This step might be simplified by "Qt::AA_UseHighDpiPixmaps". I'm not sure, the
documentation here isn't clear.

But the even harder part is you need to rewrite the image rotation and cropping
code, since now you are cropping the image to (widget size *
devicePixelRatio()). It's a bit tricky and many code in different locations
made the assumption that widget size = the pixmap size in it, which no longer
holds and thus broken code is scattered everywhere.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel

Reply via email to