Bug 355043 - Cannot differentiate between review and search highlights
Summary: Cannot differentiate between review and search highlights
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 0.20.3
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
Depends on:
Reported: 2015-11-08 17:07 UTC by Marco
Modified: 2018-05-18 15:27 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:

An example of how the problem. (1.36 MB, video/webm)
2015-11-08 17:10 UTC, Marco
Mendeley search result in highlighted text (15.16 KB, image/png)
2016-01-16 11:25 UTC, Simone Gaiarin
Search feedback in google drive (57.91 KB, video/x-matroska)
2016-01-16 11:29 UTC, Simone Gaiarin

Note You need to log in before you can comment on or make changes to this bug.
Description Marco 2015-11-08 17:07:55 UTC
Problem: I do use highlight with the default color, when I search for a string I get the same highlight color, and therefore sometimes I can not really see where the highlighted string is, either because is already highlighted or because it cannot be easily differentiated from other highlighted text.

Possible solution: Please add an option to customize  the background color to highlight the search string.

Reproducible: Always

Steps to Reproduce:
1. Open a PDF document
2. Highlight a sentence.
3. Try to search a word in the highlighted sentence.

Actual Results:  
It is hard to actually see where the found word is.

Expected Results:  
The searched string is clearly visible.

I am using  0.20.2 from debian stable, but I cannot select that version on the version select box.
Comment 1 Marco 2015-11-08 17:10:08 UTC
Created attachment 95388 [details]
An example of how the problem.
Comment 2 Albert Astals Cid 2015-11-10 23:46:27 UTC
I suggest you change the default review highlight color which you can already do instead of asking us to do new code to let people choose the higlighint color?

This doesn't mean we should probably include a black border so it's easier to differentiate search vs highlight.
Comment 3 Simone Gaiarin 2016-01-16 11:25:52 UTC
Created attachment 96681 [details]
Mendeley search result in highlighted text

Here is an example of search match in highlighted text. I use mendeley and that kind of solution works fine.
Comment 4 Simone Gaiarin 2016-01-16 11:29:22 UTC
Created attachment 96682 [details]
Search feedback in google drive

Another improvement to distinguish between search matches and highlighted text may be to add a search feedback with a pulsed background color on the text or similar.

An example is google document search feedback (see attachment).
Comment 5 Oliver Sander 2017-08-04 09:23:59 UTC
I have a patch that adds a black rectangle to the search results, but it needs 


to go in first.
Comment 6 Oliver Sander 2017-09-02 18:20:07 UTC
My patch is at 


The above-mentioned preparatory patch has been committed as

Comment 7 Nate Graham 2017-09-12 02:18:46 UTC
Update: the patch is now at https://phabricator.kde.org/D7662
Comment 8 Albert Astals Cid 2018-05-18 15:27:56 UTC
Git commit 004efa70e4a764bbd780d4f3e5bcaf40de70a1a6 by Albert Astals Cid, on behalf of Oliver Sander.
Committed on 18/05/2018 at 15:27.
Pushed by aacid into branch 'master'.

Draw a dark rectangle around highlighted search results


Makes it easier to distinguish search results from text with a 'highlight' annotation.

Reviewers: #okular

Subscribers: okular-devel, simgunz, cfeck, aacid, ngraham

Tags: #okular

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

M  +5    -0    ui/pagepainter.cpp