[Differential] [Request, 286 lines] D4254: add new test for scalable exposure
Harald Sitter
noreply at phabricator.kde.org
Mon Jan 23 15:52:17 UTC 2017
sitter created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
REVISION 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)
REPOSITORY
R266 Breeze Icons
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D4254
AFFECTED FILES
autotests/CMakeLists.txt
autotests/scalabletest.cpp
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: sitter
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170123/a2ad0e8f/attachment.html>
More information about the Kde-frameworks-devel
mailing list