Draw completion proposals always as focused#2793
Draw completion proposals always as focused#2793Christopher-Hermann wants to merge 1 commit intoeclipse-platform:masterfrom
Conversation
|
@iloveeclipse I had fixed this issue in the past, but we had to revert the changes since you found some issues on Linux: #1690 On Mac and Windows it looks good. |
9972b7b to
e65423e
Compare
|
I will test later, but in general I would assume this is not for this release, M3 is planned for tomorrow and the change affects everyone using content assist. |
...rg.eclipse.jface.text/src/org/eclipse/jface/contentassist/CompletionProposalDrawSupport.java
Outdated
Show resolved
Hide resolved
...rg.eclipse.jface.text/src/org/eclipse/jface/contentassist/CompletionProposalDrawSupport.java
Show resolved
Hide resolved
I see errors on every popup close: |
773fb5f to
6ffbfb8
Compare
Yes I need to check this, there are also some "SWT Resource was not properly disposed" errors |
These are most likely follow ups of original error |
51a7e93 to
a4fdbaf
Compare
Should be fixed. Is the coloring working on Linux? |
233e2c8 to
c6a0e42
Compare
|
@iloveeclipse can you confirm that the coloring is working on linux like expected? MacOS and Windows is working. Then I would merge this change. |
You can't merge the change, we are in the RC phase. |
c6a0e42 to
2f7fe7b
Compare
2f7fe7b to
33b1cf0
Compare
|
If there are no objections I would merge the PR |
Personally I find the focus color to distracting - it grabs too much of my attention while typing. |
Yes, good point. I will check if we can just change the non focus color to something more visible. The problem is, as far as I understood, that on Linux the code completion is always rendered with focus back ground color. So when changing the color, it will most probably change the behavior on Linux. |
|
I tried using SWT.COLOR_TITLE_INACTIVE_BACKGROUND if the control is not focused, but this is even more worse (at least on MacOS). So I see two ways to solve the issue:
|
33b1cf0 to
8bb592a
Compare
When opening the completion proposals via the keyboard, the focus will stay in the editor to be able to accept further user input. This is causing the completion proposal to be drawn in non focus colors. This colors can lead to UX problems, especially in dark theme. With this fix, the completion proposals are always drawn in focused colors. Fixes eclipse-platform#1688
8bb592a to
81ff498
Compare
|
@Christopher-Hermann I rebased on the current I also set this one to a draft since I am trying to integrate it into #3659 via cherry-pick (hence the rebase). If I succeed then this PR could be dropped. I hope that's fine by you? |
Yes, this could be done with the new PR. I also tried this out and it works fine. I guess the only thing is the decision/discussion if we want to color the completion always as selected, or if we should keep the non focus color. I guess for the second we don't have to do anything, this should work out of the box with #3659 |
For me it makes sense to use the same color that lists/trees have when their items are selected. I'll try that and see how it looks. |


Problem description
When opening the completion proposals via the keyboard, the focus will stay in the editor to be able to accept further user input. This is causing the completion proposal to be drawn in non focus colors. This colors can lead to UX problems, especially in dark theme. With this fix, the completion proposals are always drawn in focused colors.
Before the fix in dark theme, it was hard to sport the selected proposal:

With the fix, the proposal is colored in the focus color:

How to retest
Fixes #1688