add new test for scalable exposure

Authored by sitter on Jan 31 2017, 11:49 AM.


add new test for scalable exposure

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

  • 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)

Subscribers: Frameworks

Tags: Frameworks

Differential Revision:


sitterJan 31 2017, 11:50 AM
Differential Revision
D4254: add new test for scalable exposure
R266:ab94d0298f6b: update breeze-dark apps 48px, fixed categories 32px from breeze