Fix blurry icons by adding UseHighDpiPixmaps flag
ClosedPublic

Authored by mthw on May 3 2020, 7:32 AM.

Details

Summary

When using fractional scaling, icons on the top are blurred. This patch fixes the issue.
The only change needed to the code is to find a better placement for the line.

Test Plan

No side effects.

Before:


After:

Diff Detail

Repository
R456 Lokalize
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mthw requested review of this revision.May 3 2020, 7:32 AM
mthw created this revision.
mthw edited the summary of this revision. (Show Details)May 3 2020, 7:39 AM
mthw edited the test plan for this revision. (Show Details)
mthw added a subscriber: sdepiets.May 3 2020, 7:41 AM

I am not sure who should review this patch. Maybe @sdepiets?

Sorry I thought I had sent my comments but I didn't submit
Please see above

src/main.cpp
67
mthw updated this revision to Diff 81987.May 5 2020, 10:58 AM

Moved and changed comment

sdepiets accepted this revision.May 5 2020, 11:02 AM
This revision is now accepted and ready to land.May 5 2020, 11:02 AM

No, it's better in the first patch before the QApplication constructor.

sdepiets requested changes to this revision.EditedMay 5 2020, 11:09 AM

Sorry I thought you had changed to app. that kwallet is using for instance instead of the static method

You can do either way, either the static method at the start or the app.setAttribute after the constructor.

src/main.cpp
67

can you use
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
like is the case on kwallet for instance

This revision now requires changes to proceed.May 5 2020, 11:09 AM
mthw added a comment.May 5 2020, 11:20 AM

So, should it be before or after the constructor? Multiple apps already use it before.

In D29376#663903, @mthw wrote:

So, should it be before or after the constructor? Multiple apps already use it before.

I think you can put it on the line just before the constructor. There doesn't seem to be a strong consensus between the static method and the instance method.

mthw updated this revision to Diff 81988.May 5 2020, 11:40 AM

Move again, empty lines removed

sdepiets accepted this revision.May 5 2020, 12:07 PM
This revision is now accepted and ready to land.May 5 2020, 12:07 PM
mthw added a comment.May 5 2020, 2:11 PM

If everything is fine, can you land this, please? Also, could this go into 20.04?

This revision was automatically updated to reflect the committed changes.
In D29376#663950, @mthw wrote:

If everything is fine, can you land this, please? Also, could this go into 20.04?

Done for both
Thanks