Bug 363441

Summary: Replaced text is shown black on black
Product: [Applications] kate Reporter: Valdas <zmogas>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: 04qw59ty, slartibart70
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot of Kate's black on black highlight.

Description Valdas 2016-05-23 16:45:47 UTC
In Frameworks version pre  5.22.0 when I perform "Replace all" in Kate replaced text was shown black on green.
After update in to 5.22.0 replaced text is showed black on black (see screenshot).

 In Krusader's editor (it uses Kate's component) replaced text is showed black on green as always.

 Kate's About shows that I have version 15.12.3.

Reproducible: Always


Actual Results:  
Replaced text is highlighted unreadably.

Expected Results:  
It must be readable.
Comment 1 Valdas 2016-05-23 16:46:43 UTC
Created attachment 99146 [details]
Screenshot of Kate's black on black highlight.
Comment 2 Dominik Haumann 2016-05-28 13:09:03 UTC
Please adapt your color scheme: Whenever we replace text, the text color of the highlighted matches now uses the default text color (which is black in your case).

Did you change the search & replace background colors? To my understanding you did, since the defaults are rather geenish or yellowish - is that correct?

This change was done to get better contrast, since it is hard to find a background color that matches all different foreground color text can have. Now, the foreground color is always the default text color in case a search & replace highlight is visible.
Comment 3 Dominik Haumann 2016-05-28 13:19:02 UTC
Oh damn, you are correct. A bug slipped in that sets the background color to the foreground color, which in turn leads to the bug you reported.

A review request to fix this is here: https://git.reviewboard.kde.org/r/128035/
Comment 4 Dominik Haumann 2016-05-28 16:30:01 UTC
Git commit bb1968631c2931c8a67b5f4bfc92a0553d00bc83 by Dominik Haumann.
Committed on 28/05/2016 at 16:29.
Pushed by dhaumann into branch 'master'.

Search & Replace: Fix replace background color (regression introduced in v5.22)
REVIEW: 128035

M  +1    -1    src/search/katesearchbar.cpp

http://commits.kde.org/ktexteditor/bb1968631c2931c8a67b5f4bfc92a0553d00bc83
Comment 5 Christoph Feck 2016-05-30 02:18:45 UTC
*** Bug 363681 has been marked as a duplicate of this bug. ***
Comment 6 Dominik Haumann 2016-09-02 11:50:46 UTC
*** Bug 368032 has been marked as a duplicate of this bug. ***