add new test for scalable exposure
ClosedPublic

Authored by sitter on Jan 23 2017, 3:52 PM.

Details

Summary

the icon themes use SVG but do not want the same icon to be used for
small resolutions as to not have high-detail icons at super small sizes so
they become a mush of colors.
on the other hand however they are SVG and thus scalable and so higher
icon resolutions are not specifically made but rather expected to scale up.

the scaling up portion of the equation requires icon files to actually
be available in a directory marked scalable. this is easy to get wrong and
thus prevent higher resolutions from being available when doing a strict
lookup as for example done by appstream.

e.g. if apps/64 is marked scalable but doesn't container a 'klipper' icon,
if one then proceeds to strictly lookup a 192x192 version of 'klipper' one
would come back empty handed.

to prevent this sort of issue from appearing in the future there are now
two preliminary autotests to ensure icons are available in a scalable
directory.

  • test_scalable asserts that all "fixed" icons (i.e. icons in a fixed size directory) are in fact also available as scalable (currently disregards size constraints involved)
  • test_scalableDuplicates asserts that each scalable icon only appears in one scalable directory. specifically if more than one scalable variant is available the icon theme spec does not specify that the closest match is used, but among scalable versions all are considered equal so the first wins. this is a problem if apps/48/klipper.svg and apps/32/klipper.svg exist and both are marked scalable but they have different visuals. in one application the 32 version might get used and in another the 48 version is used. this tests prevents this by enforcing the equality by means of not allowing multiple scalable variants (again, not taking size constraints into consideration)

Diff Detail

Repository
R266 Breeze Icons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter updated this revision to Diff 10459.Jan 23 2017, 3:52 PM
sitter retitled this revision from to add new test for scalable exposure.
sitter updated this object.
sitter edited the test plan for this revision. (Show Details)
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 23 2017, 3:52 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
sitter updated this revision to Diff 10460.Jan 23 2017, 3:56 PM

warning--
qdebug the limited testing of the test

This revision was automatically updated to reflect the committed changes.