Okular text selection readability issue

Xu Zhao i at xuzhao.net
Tue Apr 14 22:51:01 BST 2020


Dear Okular developers,

Recently I noticed a usability issue with Okular's text selection tool.
By default, Okular uses the KDE theme's text.highlight attribute as the background color for the text selection.
Meanwhile, this color is also used in other KDE tools (e.g., Kate) as the selection background color.
Note that this attribute is often set to dark colors, because Kate(or other tools) is able to invert the color of the text when it is selected (e.g. black(normal) -> white(selected)). However, inverting the color of PDF text is harder, at least not implemented on Okular. As a result, when the background color is set to dark colors, the foreground color of the text is still black, leading to less-readable results. 

Proof of screenshot: https://okular.kde.org/images/screenies/okular-textselection.png
There is already a bug report on this issue but it has received little attention from the developers:
https://bugs.kde.org/show_bug.cgi?id=370726

Besides inverting the PDF font color, I think there are two ways to fix this problem:
1) Intelligibly pick a lighter color based on the theme's text selection background color.
2) Let user specify the text selection background color in the configuration options.

Please let me know what you think. Any comments are welcome.

Best,
Xu

--
Xu Zhao
i at xuzhao.net


More information about the Okular-devel mailing list