Bug 469978 - Kirigami.Icon rendering black on Android
Summary: Kirigami.Icon rendering black on Android
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.106.0
Platform: Android Android 13.x
: NOR normal
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-19 09:12 UTC by Remko van Wagensveld
Modified: 2023-08-05 15:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments
Peruse running on Android 13 with black Thumbnails (121.96 KB, image/png)
2023-05-19 09:12 UTC, Remko van Wagensveld
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Remko van Wagensveld 2023-05-19 09:12:09 UTC
Created attachment 159094 [details]
Peruse running on Android 13 with black Thumbnails

SUMMARY
When using Kirigami.Icon on Android are rendered black. When using Qt's Image Component they are rendered correctly. Related discuss.kde.org Thread: https://discuss.kde.org/t/question-regarding-kirigami-on-android/1498?u=malrak
The Kirigami.Icon's are loaded via an AsyncImageProvider.

STEPS TO REPRODUCE
1. Build https://invent.kde.org/graphics/peruse/-/merge_requests/34/diffs?commit_id=1684e5d0494e888711c22b09749cc75cbd7f4236 and install it on Android
2. Enable Peruse to have access to all files if on Android >= 10.0 (Settings -> Apps -> Special Access -> Access all files -> Enable Peruse). This is needed as the version is still an early state of Peruse on Android.
3. Add Comics to `/storage/emulated/0/Comics`and open Peruse in Portrait Mode.

OBSERVED RESULT
The thumbnails will be rendered black.

EXPECTED RESULT
The thumbnails will be rendered correctly.

SOFTWARE/OS VERSIONS
KDE Frameworks Version: 5.106.0
Qt Version: 5.15

ADDITIONAL INFORMATION
When using an Image instead of Kirigami.Icon the Thumbnails get rendered correctly, see https://invent.kde.org/graphics/peruse/-/merge_requests/34/diffs?commit_id=99cf409fb98e9c7361c5177a243740c3225de1ab
Also, when changing the Columns from 2 Columns to only 1 the images load correctly with Kirigami.Icon, see: https://discuss-cdn.kde.org/uploads/default/original/2X/e/ef33405d90bb53417b7784ffdbaee8aa854aee0e.jpeg
Comment 1 Bug Janitor Service 2023-08-04 14:57:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1192
Comment 2 Nate Graham 2023-08-05 15:48:15 UTC
Git commit bdb322527fbc910ce7124a45dc43dfaa0fad1522 by Nate Graham.
Committed on 04/08/2023 at 16:58.
Pushed by ngraham into branch 'master'.

Icon: Remove automatic heuristic-based monochrome icon re-coloring

This feature has caused many bugs over the years and its value is
dubious to begin with. Automatically masking a colorful icon to instead
be monochrome based on this or that heuristic violates the integrity of
the user's icon theme and enforces a stylistic preference for monochrome
icons that is not appropriate to do at the library level.

If the user is using an icon theme whose icons have any color in them
despite being 16 or 22px size or using the `-symbolic` suffix, this
needs to be considered an intentional stylistic choice on the part of
the icon theme, and it isn't something that we should monkey with here.

As a bonus, we also reap an efficiency win by simply doing less
unnecessary work most of the time.

If a developer wants to do this masking anyway, they are still free to
set `mask: true` in their code and then it will happen on an opt-in
basis.
Related: bug 473001, bug 471803, bug 465422, bug 451538
FIXED-IN: 6.0

M  +2    -93   src/icon.cpp

https://invent.kde.org/frameworks/kirigami/-/commit/bdb322527fbc910ce7124a45dc43dfaa0fad1522