|
|
|
|
|
|
|
|
|
Re: Black tooltips on dark background [message #1768640 is a reply to message #1759687] |
Thu, 20 July 2017 16:38  |
Eclipse User |
|
|
|
This problem also occurs for the combination
fedora26 + eclipse neon + mate
Here is some information and a workaround:
First a summary of the situation:
-The problem being solved is the black background in the tooltips
which appear when you hover over a variable while using the C++ debugger.
Other popups seem fine.
-There appear to be no settings in eclipse itself with which this can be fixed (or
I could not find any)
-It is not possible to fix this using configuration options in mate.
-The old workaround of setting SWT_GTK3=0 does not work: eclipse hangs forever
at startup in fedora26 although it did work with the previous eclipse on fedora24
-The "simplest" correct solution SHOULD BE to open "system - preferences - appearance.
Then select the desired theme and press customize and "save as". If the name you
select for the customized theme is "foreclipse", a directory will be created called
~/.themes/foreclipse/. In that directory you can edit theme_bg_color in index.theme.
HOWEVER THIS DOES NOT WORK. It is also horrible of course that there is no easier way
to change a simple colour.
The reason it does not work is that eclipse (or perhaps GTK3) does not respect the
value of variables like toolip_bg_color, at least not in the case of tooltips. Ir suspect that something in eclipse or gtk3 reads the theme files, but interprets them incorrectly.
The workaround:
1. Select a theme you like. For me TraditionalOK is a theme with reasoanble defaults
(more or less the opposite of the tablet-themes gtk3 wants everyone to use(
2. In /usr/share/themes/TraditionalOk/gtk-3.0/ (or the equivalent for your theme)
find the file gtk-widgets.css
3. Locate the section like
tooltip,
tooltip.background,
.tooltip,
.tooltip.background {
padding: 4px;
border-style: solid;
border-width: 1px;
border-color: @theme_tooltip_border_color;
border-radius: 0px;
background-color: ;
color: @theme_tooltip_fg_color;
text-shadow: none;
}
and replace @theme_tooltip_fg_color and @theme_tooltip_border_color;
directly with the colours you want. For example:
tooltip,
tooltip.background,
.tooltip,
.tooltip.background {
padding: 4px;
border-style: solid;
border-width: 1px;
border-color: @theme_tooltip_border_color;
border-radius: 0px;
background-color: #f5f5b5;
color: #000000;
text-shadow: none;
}
Note that the problem is with not recognizing the @... defines.
Even entering the definitions such as
@define-color my_bg_color #f5f5b5;
@define-color my_fg_color #000000;
immediately above the css block does not help.
Save the resulting file. This needs to be done as root. There is probably
also a way to save it as a use theme (but don't ask me how)
4. Switch to another theme than the one edited (e.g.. from TraditionalOk to
Delorian) and then back. This is to ensure that the edited theme is not cached.
Perhaps this step is not needed.
5. Restart eclipse, because eclipse seems to read the colours at startup and then
cache them.
This problem has been a true nightmare and has now gone on for many years
At one time, it was so bad (black on black) that eclipse was impossible to use. Then
I spent hours editing config files without success. Finally, I discovered the SWT_GK3
trick. And now this...
|
|
|
Powered by
FUDForum. Page generated in 0.06331 seconds