Background Color of Embedded Xtext editor does not follow dark theme [message #1795570] |
Tue, 25 September 2018 11:27 |
|
In the Eclipse 4diac project we are using now for quite some time Xtext embedded editors in different places. Recently i noticed that when changing 4diac to dark theme the background color of the editor is not as it should be (see also the attached screenshot). I tested this with the Eclipse 2018-09 release (platform as well as Xtext).
Does anyone have a tip for me what I may be missing here in my editor setup?
|
|
|
|
Re: Background Color of Embedded Xtext editor does not follow dark theme [message #1795585 is a reply to message #1795572] |
Tue, 25 September 2018 15:48 |
|
After spending the last 2 hours or so digging deeper into it I can see I don't think it is on the Xtext side. It seems that the root cause is the SourceViewer and here the VerticalRuler area. As soon as there is a vertical ruler area theming is not done correctly. I can even reproduce this with a plain SourceViewer as well with an embedded Xtext editor. It could be that I need to do additional setup but I haven't found anything sofar. The only difference that I noticed in the CSS layout is that with rulers an additional canvas is introduced holding the rulers and the StyledText widget. But I think this should go further into the platform forum.
|
|
|
|
|
|
Re: Background Color of Embedded Xtext editor does not follow dark theme [message #1795661 is a reply to message #1795607] |
Wed, 26 September 2018 13:34 |
|
Hi Ed,
As I spent quite some time in the code and could reproduce the behavior also for a plain SourceViewer, which is used by the embedded xtext editor I think it is really a jface/platform issue. Especially as when there is no vertical ruler area (e.g., line numbers error marker) everything is themed correctly. So I would say lets wait what and if I get a response to my bug report to the platform team.
Cheers,
Alois
|
|
|
|
|
Re: Background Color of Embedded Xtext editor does not follow dark theme [message #1810004 is a reply to message #1795668] |
Sun, 28 July 2019 21:36 |
|
After half a year I today found some time to play around with this thing. I looked more into what the general TextEditor and its parent classes are doing. I noticed there that these are setting quite some colors manually. When I do that by myself to the Embedded editor I could achieve now much better results. The only thing that is now still in the wrong color is the annotation area. Is there some way how I can set the foreground and background color of the annotation area?
I think in the mid term these settings should be done by embedded editor itself.
BR,
alois
|
|
|
Powered by
FUDForum. Page generated in 0.04960 seconds