[colors-kcm] Fix blurry previews
AbandonedPublic

Authored by filipf on Mar 2 2019, 11:18 AM.

Details

Reviewers
broulik
rooty
davidedmundson
Group Reviewers
VDG
Summary

With the current settings text in color scheme previews is blurry. This patch aims to fix that and as a side-effect also creates more room in the grid layout now fitting 4 rows instead of 3 in minimum window size.

Test Plan

Before:

After:

Diff Detail

Repository
R119 Plasma Desktop
Branch
fix-blurry-previews (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9089
Build 9107: arc lint + arc unit
filipf created this revision.Mar 2 2019, 11:18 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 2 2019, 11:18 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
filipf requested review of this revision.Mar 2 2019, 11:18 AM
filipf edited the summary of this revision. (Show Details)Mar 2 2019, 11:19 AM
filipf edited the test plan for this revision. (Show Details)
filipf added reviewers: broulik, VDG.

If this is too small the next number that doesn't result in blurry previews is multiplying with 16:

rooty accepted this revision as: rooty.Mar 2 2019, 2:48 PM
rooty added a subscriber: rooty.

Looks good to me. You might want to wait for someone else's say-so too tho

This revision is now accepted and ready to land.Mar 2 2019, 2:48 PM
davidedmundson requested changes to this revision.Mar 2 2019, 2:53 PM
davidedmundson added a subscriber: davidedmundson.

I don't understand

Kirigami.gridUnit is a whole number
13 is a a whole number

Why does Math.round fix anything?

This revision now requires changes to proceed.Mar 2 2019, 2:53 PM
filipf updated this revision to Diff 52986.Mar 2 2019, 2:56 PM

don't round numbers unnecessarily

Looks like KCM GridView should round the cell sizes to avoid non-integer pixel alignment

Why does this make a difference to things being blurry?

filipf added a comment.EditedMar 4 2019, 4:39 PM

Actually now that I take a closer look all of our previews are blurry. It's because there's text in the colors KCM that it becomes obvious.

Compare the desktop theme KCM preview in its original state:

And then with cell width set the same way as in this diff:

Clearly this needs to be handled in the GridView files. So far I haven't been successfully in fixing it there so if anyone else has an idea let's fix it.

filipf abandoned this revision.Mar 4 2019, 4:39 PM
ngraham added a subscriber: ngraham.Mar 4 2019, 4:57 PM

Make its flickable have pixelAligned: true, maybe?

@filipf It's time for to learn the magic of gammaray !

gammaray kcmshell5 colors

and go to the quick scenes tabs. It might tell you something useful.

filipf added a comment.Mar 4 2019, 9:32 PM

@filipf It's time for to learn the magic of gammaray !

gammaray kcmshell5 colors

and go to the quick scenes tabs. It might tell you something useful.

Gammaray in Manjaro crashes any time Quick Scenes is opened for whichever KCM, KDE Neon Dev Unstable's Gammaray doesn't even have Quick Scenes :/

As for possible solutions, I've tried adding Math.round just about anywhere possible in GridView and GridViewKCM but to no avail. Also tried pixelAligned but that didn't seem to work either.

It would probably be best to continue search for the cause and solution on a bug report. I've found this one: https://bugs.kde.org/show_bug.cgi?id=393995