Bug 315189

Summary: Auto Word Completion Popup Heading Background & Text Are The Same
Product: [Applications] kate Reporter: Félim Whiteley <felim>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: minor CC: cfeck, christoph, ilmari.lauhakangas, justin.zobel, skynet
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Proof of fixed bug

Description Félim Whiteley 2013-02-15 10:23:59 UTC
Kate 4.10 from Kubuntu 12.04 with backports PPA

Using the autocomplete tool, the popup has a heading called "Auto Word Completion". On my system it is set to black, the text for the suggested words is ok, but the heading just appears like a black bar, both heading background and text are black.

If I click focus away from kate then click back in again, the popup has gone as would be expected, but typing again it re-pops-up the box but this time the heading is visible.

 I have tried setting the colour seperatly using the Colours -> Tooltip -> Normal background, and setting ti to say green, the issue still occurs but now everything is greeen rather than black.


Reproducible: Always

Steps to Reproduce:
1. Open new text file and add text "thisisareallylongstring"
2. Go to a new line start typing "thisis" the popup will display, the heading will be black.
3. Click away from kate to change focus, click back into focus kate then continue typing "thisisare" and not the heading will be visible as "Auto Word Complet" note the text being cut off.


Expected Results:  
The text should not be same colour as background

This is Kubuntu 12.04 using the KDE 4.10.0 backports PPA
Comment 1 Christoph Feck 2013-02-15 12:30:36 UTC
From what I see, it uses ButtonText, both for the View background, as well as the Highlight background.
Comment 2 Félim Whiteley 2013-02-15 12:57:27 UTC
(In reply to comment #1)
> From what I see, it uses ButtonText, both for the View background, as well
> as the Highlight background.

That's strange as changing the popup background certainly changed it instantly to the green.
Comment 3 Majki 2013-05-07 11:45:30 UTC
I can confirm that, 4.10.2 on Linux Mint 14.
Comment 4 Joseph Wenninger 2013-07-18 11:26:12 UTC
Git commit 51fb673e7f6e02a414505eb5c10b5d4493dac3d9 by Joseph Wenninger.
Committed on 18/07/2013 at 11:20.
Pushed by jowenn into branch 'master'.

This should finally fix the problem, that the first time the completion popup is shown, the first group is empty.
The problem was that group titles did not get created, while m_hasGroup was empty, if a model later on in the chain caused  m_hasGroup to be set, the first models didn't have valid groups -> no header text displayed. This definitely needs testing and should not be backported yet, as long as it is not being tested

M  +26   -2    part/completion/katecompletionmodel.cpp
M  +1    -0    part/completion/katewordcompletion.cpp

http://commits.kde.org/kate/51fb673e7f6e02a414505eb5c10b5d4493dac3d9
Comment 5 Dominik Haumann 2013-08-14 12:20:53 UTC
Félim and Majki: Can you please follow http://kate-editor.org/get-it/ and check whether this issue now is fixed for you?
Comment 6 Majki 2013-08-14 12:32:28 UTC
Created attachment 81703 [details]
Proof of fixed bug

Kate now properly autocomplete words.
Comment 7 Dominik Haumann 2013-08-14 12:55:59 UTC
Ok, works for me, too. So let's close this.
Comment 8 Christoph Feck 2013-08-14 16:17:49 UTC
Looking at Majki's screen shot, he actually confirmed the bug is still visible on his system (the heading is black on black).
Comment 9 Christoph Feck 2013-08-14 16:19:15 UTC
Please use CheckColorRoles color scheme to see which wrong combination of fg/bg colors are used.
Comment 10 Majki 2013-08-14 17:03:03 UTC
Heading was always black? There is no "first" word - black bar is separator? 

http://i.imgur.com/x47kn5n.jpg
Comment 11 Majki 2013-08-14 17:03:46 UTC
And yes, I clicked "use KDE color settings" and extra word appears on black bar.
Comment 12 Christoph Feck 2013-08-29 21:57:31 UTC
For whatever reason, auto completion does no longer work on my system, so I cannot verify if this is indeed fixed. Will investigate.
Comment 13 Milian Wolff 2013-10-22 11:25:16 UTC
Git commit e553de3c3d55b1289d1ae13233ed6f9e15f36cd1 by Milian Wolff.
Committed on 22/10/2013 at 11:23.
Pushed by mwolff into branch 'master'.

Revert "This should finally fix the problem, that the first time the completion popup is shown, the first group is empty."

This reverts commit 51fb673e7f6e02a414505eb5c10b5d4493dac3d9.

This completely breaks code completion with the simple word-based
code completion builtin to Katepart. Probably the issue would arise
for any code completion models which are not grouped at all.

Conflicts:
	part/completion/katecompletionmodel.cpp

M  +1    -1    part/completion/katecompletionmodel.cpp

http://commits.kde.org/kate/e553de3c3d55b1289d1ae13233ed6f9e15f36cd1
Comment 14 Milian Wolff 2013-10-22 11:25:34 UTC
Reopened as the commit needed to be reverted.
Comment 15 Christoph Feck 2013-10-25 22:04:59 UTC
I have no idea where it comes from, but the delegate uses QPalette::ButtonText for the foreground/text color, both for unselected, as well as for selected items in the popup.

Tested with CheckColorRoles color scheme.
Comment 16 Christoph Feck 2013-10-25 22:08:21 UTC
Hm, no, I was wrong. The color just looked like the button text color in CheckColorRoles theme. Still no idea how/where the text color is decided.
Comment 17 Christoph Feck 2014-02-19 21:24:14 UTC
Is "syntax" the right component? I had the impression it is used for the source highlighting descriptions.
Comment 18 Buovjaga 2016-06-19 10:31:15 UTC
There is no heading and no problem for me.
Please someone give an update on the situation.

Arch Linux 64-bit
Kate 16.04.2
KDE Frameworks 5.22.0
Qt 5.6.1
xcb wm
Comment 19 Justin Zobel 2020-10-29 10:14:13 UTC
I can't reproduce this issue with Kate 20.11.70.

Can others please confirm this is now fixed for them as well.
Comment 20 Bug Janitor Service 2020-11-13 04:33:41 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 21 Bug Janitor Service 2020-11-28 04:33:58 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!