Bug 544917 - Background color is missing for selected text in editors
Summary: Background color is missing for selected text in editors
Status: CLOSED DUPLICATE of bug 542469
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.10   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2019-02-28 08:45 EST by Josef Cacek CLA
Modified: 2019-03-07 13:56 EST (History)
2 users (show)

See Also:


Attachments
selected-text.png (207.05 KB, image/png)
2019-02-28 08:45 EST, Josef Cacek CLA
no flags Details
without-selection.png (216.53 KB, image/png)
2019-02-28 08:45 EST, Josef Cacek CLA
no flags Details
default-preferences.png (88.64 KB, image/png)
2019-02-28 08:46 EST, Josef Cacek CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Cacek CLA 2019-02-28 08:45:04 EST
Created attachment 277712 [details]
selected-text.png

I use Ubuntu MATE 18.04.

I upgraded Eclipse JEE IDE to version 2018-12-R, I struggle with text selection in editors (e.g. Java or XML). The selection is not highlighted with a background color. I use the default theme - Light/Default.

IIRC I had the same problem with the previous version (JEE Photon R), but I was able to workaround it by switching to GTK 2 in eclipse.ini:

--launcher.GTK_version
2

This workaround doesn't work anymore with 2018-12-R so I would need a GTK 3 solution.

I've also tried to switch to Classic/Classic Theme, but the behavior doesn't change.
Comment 1 Josef Cacek CLA 2019-02-28 08:45:42 EST
Created attachment 277713 [details]
without-selection.png
Comment 2 Josef Cacek CLA 2019-02-28 08:46:03 EST
Created attachment 277714 [details]
default-preferences.png
Comment 3 Eric Williams CLA 2019-02-28 08:59:38 EST
Is the bug reproducible with a different GTK theme? I.e. try the default Ubuntu theme (Ambiance) or the default GTK theme Adwaita.
Comment 4 Josef Cacek CLA 2019-02-28 09:28:53 EST
I use default MATE theme Ambiant-MATE.

The background color for selected text seems to work in some MATE themes:
* BlackMATE
* BlueMenta
* GreenLaguna
* Menta
* TraditionalGreen
* TraditionalOk

Other themes have the same problem as the default theme:
* Ambiant-MATE-Dark
* Blue-Submarine
* Green-Submarine
* Radiant-MATE
Comment 5 Eric Williams CLA 2019-02-28 09:51:11 EST
(In reply to Josef Cacek from comment #4)
> I use default MATE theme Ambiant-MATE.
> 
> The background color for selected text seems to work in some MATE themes:
> * BlackMATE
> * BlueMenta
> * GreenLaguna
> * Menta
> * TraditionalGreen
> * TraditionalOk
> 
> Other themes have the same problem as the default theme:
> * Ambiant-MATE-Dark
> * Blue-Submarine
> * Green-Submarine
> * Radiant-MATE

This is a theming issue -- SWT loads all system colors from the current GTK theme. It looks like the default MATE theme is missing something that the others are not.
Comment 6 Josef Cacek CLA 2019-03-04 06:36:42 EST
Could you point me to a location where the scheme is loaded into Eclipse so I could debug what's wrong there?

Thanks.
Comment 7 Eric Williams CLA 2019-03-04 11:08:57 EST
(In reply to Josef Cacek from comment #6)
> Could you point me to a location where the scheme is loaded into Eclipse so
> I could debug what's wrong there?
> 
> Thanks.

Sure, the system colors are initialized in Display.initializeSystemColors(). The color which controls the selection backgrounds for text editors is COLOR_LIST_SELECTION.
Comment 8 Eric Williams CLA 2019-03-07 13:56:49 EST

*** This bug has been marked as a duplicate of bug 542469 ***