zeal icon indicating copy to clipboard operation
zeal copied to clipboard

Highlighted search results are unreadable when using a dark theme

Open goshatch opened this issue 4 years ago • 16 comments

I'm running Zeal under Gnome using the adwaita-dark theme, and have this environment variable set to make Qt applications match the theme:

export QT_STYLE_OVERRIDE=Adwaita-Dark

When I search for something, the highlighted part of the list of results is unreadable, as seen in the screenshot below:

Screenshot from 2020-03-13 12-25-17

goshatch avatar Mar 13 '20 12:03 goshatch

Definitely a bug, but may be tricky to fix. The highlighting is inspired by Windows Explorer, but it's a simple overlay. To render properly the color of the underlying letters needs to be reversed. Will check how Windows does it with the new dark theme.

trollixx avatar Mar 14 '20 05:03 trollixx

Maybe a simpler fix would be to change the opacity of the yellow overlay to something like 0.5?

goshatch avatar Mar 14 '20 10:03 goshatch

Hello, I had fixed this problem in pull request #1124.

@trollixx If you like, I create a new solution for a dark ui based on QPalette. This should be less problematic than the CSS solution.

kaygdev avatar Apr 21 '20 18:04 kaygdev

@kaygdev I check the old PR, the relevant change from it should work, but need to detect the dark theme. Need to check if Qt has anything for that.

trollixx avatar Apr 21 '20 19:04 trollixx

In this PR I have introduce a UI Style option in Preferences/General. At this option, you can choose between the system default, the dark style and a custom CSS.

The dark style apply a shipped CSS file and I see the drawback of it. In another project I made good experiences with the QPalette in combination with the fusion style for a dark UI. I think this can also be a good solution for zeal.

kaygdev avatar Apr 21 '20 19:04 kaygdev

It's something I'd definitely be interested to look at. Relying on unsupported 3rd party style is risky, but if we can provide a relatively good experience with the Fusion style, that should be better than nothing.

trollixx avatar Apr 22 '20 06:04 trollixx

Same problem here til now for Zeal 0.6.2-dev.212+8a018dc, is any fixed patchs can merged to master?

c0001 avatar Feb 04 '21 13:02 c0001

Same here :) learning to live with it though

cocoonkid avatar Dec 16 '21 10:12 cocoonkid

Any updates on this, or any workarounds? I see you can point to a custom CSS in the settings, but not sure if that applies to the sidebar too, or what classes to override.

mttkay avatar Feb 08 '22 18:02 mttkay

what @mttkay said :-)

What would be the simplest css fix for this?

cocoonkid avatar Mar 16 '22 14:03 cocoonkid

@trollixx Thank you for this wonderful application. Is there a known fix for this as it makes my life miserable :)

cocoonkid avatar Apr 23 '22 19:04 cocoonkid

This issue is highly theme dependent. Proper fix requires quite a bit more complex logic in how search item delegate renders text.

A temporary workaround for this would be switching to another UI style. For me Fusion style renders everything quite nicely. To test it, run Zeal with -style fusion argument.

trollixx avatar Apr 16 '23 03:04 trollixx

Any ideas how to pass command line args when zeal is installed as a flatpak? I've used flatseal to set env vars such as for Qt, but it does not seem to control command line arguments. I also couldn't locate a desktop file for the zeal flatpak. :thinking:

mttkay avatar Apr 16 '23 07:04 mttkay

@mttkay I think it is flatpak run org.zealdocs.Zeal -style fusion. I haven't tried though.

trollixx avatar Apr 19 '23 05:04 trollixx

Zeal 0.6.1 under Gnome using the adwaita-dark theme with export QT_STYLE_OVERRIDE=Adwaita-Dark actually looks awesome, right out of the box :-)

What formerly (3 years ago) was grey now is white and perfectly readable on yellow image

marbx avatar Aug 06 '23 19:08 marbx

Using Zeal 0.7.0 and Adwaita-Dark 1.4.2 the search highlight is still unreadable :(

image

naquad avatar Nov 11 '23 16:11 naquad