Bug 404858

Summary: "Add Network Folder" tooltip icon does not show on Breeze, shows correctly on Breeze Dark
Product: [Applications] dolphin Reporter: Thiago Sueto <herzenschein>
Component: view-engine: tooltipAssignee: David Hallas <david>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, david, kde, nate, plasma-bugs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 19.04.0
Sentry Crash Report:
Attachments: "Add Network Folder" tooltip icon on Breeze.
"Add Network Folder" tooltip icon on Breeze Dark.

Description Thiago Sueto 2019-02-26 20:52:40 UTC
SUMMARY
The tooltip that appears on mouse hover at "Add Network Folder" does not show its icon on Breeze, but shows correctly on Breeze Dark.

My first guess is that the tooltip icon tries to follow its folder icon variant, but since the tooltip icon shows on a dark background, unlike the folder icon, which shows on Dolphin's white background, there's a mismatch.

Please see the attachments.

OBSERVED RESULT
Tooltip for Add Network Folder shows no apparent icon.

EXPECTED RESULT
Tooltip for Add Network Folder should show its icon correctly.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Developer Edition (Git Unstable)
KDE Plasma Version: 5.15.80
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.0
Kernel Version: 4.15.0-45-generic
OS Type: 64-bit
Comment 1 Thiago Sueto 2019-02-26 20:53:40 UTC
Created attachment 118391 [details]
"Add Network Folder" tooltip icon on Breeze.
Comment 2 Thiago Sueto 2019-02-26 20:54:21 UTC
Created attachment 118392 [details]
"Add Network Folder" tooltip icon on Breeze Dark.
Comment 3 Nate Graham 2019-02-27 02:22:11 UTC
The icon itself (folder-new) is fully capable of changing its color, so the problem here must be that Dolphin's tooltip isn't invoking that behavior properly.
Comment 4 David Hallas 2019-03-09 06:45:33 UTC
(In reply to Nate Graham from comment #3)
> The icon itself (folder-new) is fully capable of changing its color, so the
> problem here must be that Dolphin's tooltip isn't invoking that behavior
> properly.

I have been looking into this issue a bit and I can't figure out where the "icon changing color" process should happen? I can see that Dolphin calls the KIO::PreviewJob function, this creates a PreviewJob which ends up determining that it should use the textthumbnail plugin to generate the thumbnail. But the textthumbnail plugin bails out because it is a .desktop file, so the original image is just used, which is black on white background.

So Nate, do you have some pointers to where this color changing should happen? Could this simply be the mime type for the Add Network Location desktop entry?
Comment 5 Nate Graham 2019-03-12 13:37:11 UTC
Kai Uwe may be able to answer that question. :)
Comment 6 Kai Uwe Broulik 2019-03-12 15:50:41 UTC
Doesn't it just get a QIcon/iconName? So colorizing it should be possible like Marco did for that other tooltip stuff just now
Comment 7 David Hallas 2019-03-12 19:34:44 UTC
(In reply to Kai Uwe Broulik from comment #6)
> Doesn't it just get a QIcon/iconName? So colorizing it should be possible
> like Marco did for that other tooltip stuff just now

Hi Kai,

thanks for the reply :) Could you give some more specific pointers for this? Do you have any working samples for this? I still haven't figured out how this is handled for Breeze Dark, does it simply have a white version of the icon?
Comment 9 David Hallas 2019-03-12 19:48:55 UTC
(In reply to Nate Graham from comment #8)
> For reference:
> https://cgit.kde.org/kinfocenter.git/commit/
> ?id=23fa369831709f43a3100476b00ced10a1123f7f

Thanks for the quick reply :D - i'll try and take a look at it.
Comment 10 David Hallas 2019-03-13 20:14:41 UTC
I have a fix in review here: https://phabricator.kde.org/D19738
Comment 11 David Hallas 2019-03-17 18:11:46 UTC
Git commit 508dc815c75c9db8abaec26ae664ae41bf7f89b5 by David Hallas.
Committed on 17/03/2019 at 18:11.
Pushed by hallas into branch 'Applications/19.04'.

Fix "Add Network Folder" tooltip icon does not show on Breeze, shows correctly on Breeze Dark

Summary:
Fix "Add Network Folder" tooltip icon does not show on Breeze, shows correctly
on Breeze Dark. The fix is taken from D19596.

Test Plan:
Open Dolphin with the Breeze theme
Hover the mouse over the "Add Network Folder"
The icon is black on black

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19738

M  +17   -2    src/views/tooltips/tooltipmanager.cpp

https://commits.kde.org/dolphin/508dc815c75c9db8abaec26ae664ae41bf7f89b5
Comment 12 David Hallas 2019-03-17 18:15:33 UTC
Fix has been merged to Applications/19.04 and master. Please test and report any issues :)
Comment 13 Nate Graham 2019-03-17 23:30:56 UTC
Works great for me!
Comment 14 Patrick Silva 2019-03-22 20:25:18 UTC
Is this fix already available on neon dev unstable?
Bug persists on such distribution.
Comment 15 Patrick Silva 2019-03-23 14:01:30 UTC
it's fixed on Arch Linux running dolphin 19.04 beta \o/
Comment 16 David Hallas 2019-03-23 14:07:36 UTC
(In reply to Patrick Silva from comment #15)
> it's fixed on Arch Linux running dolphin 19.04 beta \o/

Great! Thanks for testing and commenting :D