Bug 367713 - Improve Search highlighting Scroll-bar Minimap
Summary: Improve Search highlighting Scroll-bar Minimap
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2016-08-23 11:12 UTC by Richard Llom
Modified: 2023-08-03 19:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (117.58 KB, image/png)
2016-08-23 11:13 UTC, Richard Llom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Llom 2016-08-23 11:12:57 UTC
Please improve the Search highlighting in the Scroll-bar Minimap.
Currently the highlighting is in form black boxes on the minimap (see attached screenshot).

My Suggestions:
1. The searched string in the text field is highlighted in yellow, so please use that very same color in the minimap as well. (Black has also poor contrast on dark theme.)
2. Since this is an actual minimap, please mark only the very exact string instead of of these big boxes. With the current implementation the minimap feature is lost (since it is all black) and it is not clear where exactly (column) the string is.

Thx


Reproducible: Always
Comment 1 Richard Llom 2016-08-23 11:13:28 UTC
Created attachment 100725 [details]
Screenshot
Comment 2 Kåre Särs 2016-08-23 12:04:58 UTC
Thanks for the report.

1) Yes black is not the optimal color. Yellow is not so good on light themes. The color should probably be configurable/use a theme color.

2) Marking only the match is not an option. If you want that you can turn off the scrollbar marks and get the yellow from the mini-map highlight colors. In large documents you would not be able to distinguish the results as they are merged with the surrounding text.
Comment 3 Richard Llom 2016-08-23 15:09:51 UTC
(In reply to Kåre Särs from comment #2)
> Thanks for the report.
> 
YW!

> 1) Yes black is not the optimal color. Yellow is not so good on light
> themes. The color should probably be configurable/use a theme color.
> 
I would advise against yet another option. Also sane defaults are needed anyway (to quote the VDG). If the color is good for the text view, why isn't it sufficient for the minimap?

> 2) Marking only the match is not an option. If you want that you can turn
> off the scrollbar marks and get the yellow from the mini-map highlight
> colors. In large documents you would not be able to distinguish the results
> as they are merged with the surrounding text.
I can't follow your advice, can you explain it in more detail?
If I turn scrollbar marks off, I don't see any marks at all on the scrollbar.

Can the minimap algorithm be tuned so that the match doesn't vanish?

If still using the weird boxes, please place them at least behind (as background) on the minimap.
Comment 4 Kåre Särs 2016-08-24 10:12:05 UTC
1) There is already options for "Marker Colors" but the search match marker is missing (Fonts&Colors -> Colors -> Marker Colors).

2) I meant that you can experiment with removing the "Show scrollbar marks" and see what it looks like when the matches are highlighted and not the whole line. The mini-map already shows the highlighted text, but it is not visible enough. You will quickly notice that in large documents you do not see the matches any more, as the colors are mixed with the surrounding.
Comment 5 Christoph Cullmann 2023-08-03 19:21:50 UTC
I think the current state is ok, if one wants further improvements, please provide a patch: https://kate-editor.org/join-us/