BasicListItem: use specified tint color when transparency is 0
Needs ReviewPublic

Authored by pwegner on Feb 1 2019, 2:46 PM.


Group Reviewers

This allows to disable icon tinting through setting tint color to transparent.

Diff Detail

R169 Kirigami
Lint Skipped
Unit Tests Skipped
pwegner created this revision.Feb 1 2019, 2:46 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptFeb 1 2019, 2:46 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
pwegner requested review of this revision.Feb 1 2019, 2:46 PM
mart added a comment.Feb 9 2019, 10:18 AM

can you try on kirigami master? i did a similar thing the other day with commit 015e1d0ac19e4

In the current master I get file:///home/lemourin/.qt/5.12.1/gcc_64/qml/org/kde/kirigami.2/private/GlobalDrawerActionItem.qml:39:5: Unable to assign [undefined] to QColor
(probably related to some other change).

Anyway, tinting can be disabled now after your change.

mart added a comment.Feb 14 2019, 9:55 AM

I think i'll introduce an heuristic to analyze the image and decide if it's monochrome and drop all this transparent nonsense (would make it a bit inefficient as it wuld need to read pixels colors in software but may be justified).
locally i was trying with Shannon entropy of the distribution of either colors or gray values, which seems to yeld satisfying results

mart added a comment.Apr 26 2019, 11:12 AM

so, now the decision when to color an icon and when not should be a bit smarter...

is this still necessary?

This commit broke my app. It is too big for me to find a bug in there.
The app in question is available here:

After this commit pages and toolbar don't appear at all; the only thing that's working is the drawer.

For now I'm sticking with my fork which basically means that
I can't answer your question.

mart added a comment.Apr 26 2019, 3:39 PM

This commit broke my app. It is too big for me to find a bug in there.
The app in question is available here:

when things break, pleast scream to me :) (and in general, bug report + note it on the chat is useful)

I've tried to build that app, tough cloudbrowser doesn't seem to be built/installed (if i run make in the cloudbrowser folder it says:

GEN src/CloudContext.moc.cpp
/bin/sh: -o: command not found

what should i look into to have it built/working?

Sorry for not creating a bug report..

Your build issue might be caused by pkg-config not being able to find moc.
You might have to set PKG_CONFIG_LIBDIR / PKG_CONFIG_PATH accordingly.

Here is the logic for detecting where moc is:
It works when I set PKG_CONFIG_LIBDIR=/home/lemourin/.qt/5.12.1/gcc_64/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig
I have qt installed from qt website through their maintenance tool.

You might find this useful:

I suggest running make in the root of your build directory.

mart added a comment.Apr 29 2019, 11:41 AM

I tried to add every single path in the system where there is pkgconfig stuff, but same result, the cloudbrowser folder doesn't get built and there is the invalid command -o message still

This can be closed; the icons in cloudbrowser are no longer tinted.