Bug 440199

Summary: Icons in file dialog and brush preset docker are black on dark, making them less recognizable
Product: [Applications] krita Reporter: Raghavendra kamath <raghu>
Component: UsabilityAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: halla, lynx.mw+kde
Priority: NOR    
Version First Reported In: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot showing black on dark icons

Description Raghavendra kamath 2021-07-23 15:24:41 UTC
Created attachment 140282 [details]
screenshot showing black on dark icons

Icons for folders, navigation and deletion are black coloured on dark theme. you can see the example in open file dialog and in the brush preset tag filter.
I am attaching a screenshot highlighting the icons.

This is true in both 4.4.5 and 5.0 alpha
Comment 1 Lynx3d 2021-07-25 13:04:35 UTC
That is bothering me too, I think we need make a QProxyStyle that re-implements standardIcon(...) to return an icon with proper contrast for all the QStyle::SP_FileDialog* values, if I understand how styles work correctly.
Comment 2 Lynx3d 2021-08-04 02:54:49 UTC
I just tried the proxy style idea, but that can only solve part of the issue.
The QLineEdit clear button and the top buttons of the file dialog can be overridden, but that's really more a way to provide icons the style engine itself requests, what icons really get queried differs between styles on things like QMdiArea elements.

On Linux the icons for files (mime types) and folders come from the system icon theme, so you still have black folder icons on dark grey ground etc.
Since you seem to be using Breeze icons, what can be done with a few lines of code is switching breeze and breeze-dark icon themes if we load a color theme, at least on Ubuntu they are bundled in the same package.
We could also include them in Krita, but they'd have to be organized according to freedesktop spec for QIcon routines to find them.

But then we have one more thing that doesn't fully update on color theme changes until you restart krita, I couldn't find a way to make existing QLineEdit to reload the icons yet...
And if the user doesn't want to use the a fixed icon theme like Breeze, we can't really help it.