Implements a new button on findbar that allows users to choose the color that highlights the text
AbandonedPublic

Authored by joaonetto on Jan 14 2019, 7:42 AM.

Details

Reviewers
None
Group Reviewers
Okular
Summary

Usability feature for users to customize the custmize the color on finding, as noted by some users, it was the same color as the review->highlights.

Bug:237014

Diff Detail

Repository
R223 Okular
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 7073
Build 7091: arc lint + arc unit
joaonetto created this revision.Jan 14 2019, 7:42 AM
Restricted Application added a project: Okular. · View Herald TranscriptJan 14 2019, 7:42 AM
Restricted Application added a subscriber: okular-devel. · View Herald Transcript
joaonetto requested review of this revision.Jan 14 2019, 7:42 AM
aacid added a subscriber: aacid.Jan 14 2019, 9:49 PM

I don't think it's a good idea, we now have the border around search results so they are more distinguishable from higlights.

I'm okay in discarding it.

But shouldn't we just give them the option? I can put the settings in the preferences toolbar or something.

If you move it to the config dialog i guess it may make sense to have if it's not very intrusive.

You forgot about presentationsearchbar.cpp

And if you really want to let change this yellow, you may also let people want to change the blue when searching on the thumbnail?

As you may notice I'm really not sold on this extra configuration option :D

Someone else has opinions on this?

conf/okular.kcfg
310

Let it be the same color it was, i.e. qRgb( 255, 255, 64

ui/searchlineedit.cpp
92

why does setting the color start a new search?

I'm not really sold either. No other app has this setting. It seems like one of the major reasons why we have a color scheme and color chooser system is precisely so individual apps don't have to implement features like these themselves.

I'm sure we can come up with a cleverer way to fix 237014 besides simply adding another configuration option. It's not as bad as it used to be since the search highlight now has a box around it. But maybe the bug here is that we're not using a color from the color scheme for highlighting search results. Kate uses the "Selection Background" color to highlight search results and it works okay. Can we not do this in Okular because it could conflict with the actual selection color because you can have text selected and search results highlighted at the same time? What if we used the "Selection Background" color but tinted it differently for each one?

Or maybe we could use a different shade of yellow for the highlight annotation's default yellow color?

joaonetto marked an inline comment as done.Jan 16 2019, 12:11 AM

There's some people asking for it on bugzilla, to change the search highlight color, but as Nate said, no other reader does this.

384267 Also mentions this of "Selection Background", but would it change highlight color too or only the string that I'm searching?

ui/searchlineedit.cpp
92

So the rect changes color. I think that continueSearch would be better.

aacid added a comment.Jan 16 2019, 9:31 PM

I'm not really sold either. No other app has this setting. It seems like one of the major reasons why we have a color scheme and color chooser system is precisely so individual apps don't have to implement features like these themselves.

I'm sure we can come up with a cleverer way to fix 237014 besides simply adding another configuration option. It's not as bad as it used to be since the search highlight now has a box around it. But maybe the bug here is that we're not using a color from the color scheme for highlighting search results. Kate uses the "Selection Background" color to highlight search results and it works okay. Can we not do this in Okular because it could conflict with the actual selection color because you can have text selected and search results highlighted at the same time? What if we used the "Selection Background" color but tinted it differently for each one?

Or maybe we could use a different shade of yellow for the highlight annotation's default yellow color?

https://i.imgur.com/LxkB2q3.png <- yes we have lots of different highlights, text selection, regular search, and "filter thumbnail" search. The color schemes are not prepared for so much colors.

joaonetto abandoned this revision.Jan 18 2019, 6:14 PM

There's better solutions than adding a new button, closing it.

I'm not really sold either. No other app has this setting. It seems like one of the major reasons why we have a color scheme and color chooser system is precisely so individual apps don't have to implement features like these themselves.

I think this is okay for graphic areas, while the color scheme is good for generic GUI elements (text areas without graphics).

Kate uses the "Selection Background" color to highlight search results and it works okay.

Yes, but it also uses "View Background", while the background color of a PDF file can be different.
Picture with search (find bar, thumbnails panel) in PDF from https://www.dpdhl.com/content/dam/dpdhl/en/media-center/investors/documents/annual-reports/DPDHL_2017_Annual_Report.pdf
How about just inverting the color?