Add HiDPI support
ClosedPublic

Authored by volkov on Thu, Apr 25, 3:12 PM.

Diff Detail

Repository
R483 Skanlite
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11227
Build 11245: arc lint + arc unit
volkov requested review of this revision.Thu, Apr 25, 3:12 PM
volkov created this revision.
sars added a comment.Thu, Apr 25, 7:11 PM

Same ignorant question here as for libksane... Why do we need the HighDpiPixmaps in skanlite? The images get the dpi settings from the scanner setting...

To paint non-pixelated icons on buttons.
This attribute "makes QIcon::pixmap() generate high-dpi pixmaps that can be larger than the requested size. Such pixmaps will have devicePixelRatio() set to a value higher than 1."

sars accepted this revision.Sun, Apr 28, 7:22 PM

So to get nice icons on buttons we need to "setAttribute(Qt::AA_UseHighDpiPixmaps);", but that blurs the previews -> devicePixelRatioF() for preview images.

This revision is now accepted and ready to land.Sun, Apr 28, 7:22 PM

AA_UseHighDpiPixmaps is not related to previews, it's for icons on buttons.
devicePixelRatioF is needed to paint an image as is without highdpi scaling by Qt.

volkov closed this revision.Mon, Apr 29, 1:21 PM