mate-desktop / mate-themes

Official themes for the MATE desktop
https://mate-desktop.org
GNU Lesser General Public License v2.1
75 stars 45 forks source link

Tooltips in Eclipse #165

Closed ghost closed 7 years ago

ghost commented 7 years ago

The tooltips that display using Menta theme in Eclipse are unreadable (almost black text on black background). Although tooltip background color is defined as #F5F5B5 in settings.ini, this is not honored (in Eclipse). Other themes I've tried (including Adwana) behave properly. (dark text and light background). I can add
.tooltip * { background-color: transparent; } to at least be able to read the text (lighter text on black background) this is not the answer.

screenshot from 2017-03-11 15 36 04

sc0w commented 7 years ago

I have installed eclipse (3.8.1), and apparently I can see tooltips normally with menta:

eclipsetooltip

raveit65 commented 7 years ago

Same here in fedora 26 (gtk+-3.22) bildschirmfoto zu 2017-04-11 07-45-49 bildschirmfoto zu 2017-04-11 07-51-06 @Heterodyne Does the issue still exists?

sc0w commented 7 years ago

no answer, I think we can close this

raveit65 commented 7 years ago

I bet we will get an answer if i close it ;-)

ghost commented 7 years ago

I thought this was fixed ... but no the issue persists. The tool tips outside the editor look as shown (black on yellow), but in the editor text is very dark grey on black (and unreadable).. (See original issue post above).

lukefromdc commented 7 years ago

Anything that themes tooltip.background lower in the file than those lines first appear could be overriding it. It would be in the same file or you could not reset it within gtk-widgets.css, and it should not be a matter of something more specific overriding it either. Later in a file overrides earlier in the file, and more specific overrides less specific.

On 6/17/2017 at 4:24 PM, "Michael Katzmann" notifications@github.com wrote:

Curiously, if I add ...

tooltip.background {
  background-color: @theme_tooltip_bg_color
}

to the end of gtk-widgets-backgrounds.css I get the desired result (yellow background)

I say curiously because this is already in gtk_widgets.css

tooltip.background,
.tooltip.background {
       background-color: @theme_tooltip_bg_color;
   background-clip: padding-box;
}

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/165#issuecomment-309238104

ghost commented 7 years ago

There's something curious going on ... I get a black tooltip background if I use the unmodified theme, or if I add the following to gtk-widget-backgrounds.css

@define-color theme_tooltip_bg_color #F5F5B5;
tooltip.background,
.tooltip.background {
    background-color: @theme_tooltip_bg_color;
    background-clip: padding-box;
}

bad-menta eclipsetooltip

If I explicitly define the color it works ...
tooltip.background,
.tooltip.background {
    background-color: #F5F5B5;
    background-clip: padding-box;
}

ok-menta eclipsetooltip

Its as if something (eclipse ?) is overriding the definition of the background color (theme_tooltip_bg_color)

lukefromdc commented 7 years ago

I just found that in Menta, theme_tooltip_bg_color is used in gtk-widgets.css, is defined not in gtk-main.css but gtk-main-common.css . I wonder if this is somehow causing the problems? I don't have eclipse installed but copying everything in gtk-main-common.css to the bottom of gtk-main.css would test this. There is no reason in the world this should be an issue or should fix anything-unless a bug in GTK is responsible. That's what this test is looking for.

ghost commented 7 years ago

... I don't think this is the problem because even if you define the color immediately before using it, it is ignored ..

@define-color theme_tooltip_bg_color #F5F5B5;
tooltip.background,
.tooltip.background {
    background-color: @theme_tooltip_bg_color;
    background-clip: padding-box;
}
lukefromdc commented 7 years ago

That sounds like to make Eclipse work right it may just be necessary to bite the bullet and hardcode this color directly for tooltips in gtk-widgets.css. Since tooltips look the same in Menta and BlueMenta this should not create a maintainance problem but it should be commented.

ghost commented 7 years ago

It wouldn't surprise me to find that eclipse is actually using the css directly (and not using a gtk widget). If it's expecting standard css then the gtk-3 specific @define-color definition is ignored

raveit65 commented 7 years ago

Well, there is a different between using theme in color definition or not but i forgot......... Does this work ?

@define-color tooltip_bg_color #F5F5B5;
tooltip.background,
.tooltip.background {
    background-color: @tooltip_bg_color;
    background-clip: padding-box;
}

And i don't use Eclipse. Can you please explain detailed how to reproduce the issue? As you can see in my sceenshot i have a yellow background. Btw. which distro ,gtk+3 version and mate-themes version are you using?

ghost commented 7 years ago

No, changing from theme_tooltip_bg_color to tooltip_bg_color didn't make any difference. The tooltip you are showing is in the general frame of the eclipse workspace, and yes I too see that as OK with the theme as is. The problem with tooltips specifically occurs in the editor window (all the examples that I have shown are within the editor window). It may occur in other components as well but this is where I see it.

I don't know why there is a difference between the general eclipse frame components and the editor component but the behavior is different. Also to make matters more complicated, even within the editor there are several tooltip types. When the problem is evident, there are some types of tooltips that have a black background (as seen above) and some with a white background. When the actual value is used in Menta css (background-color: #F5F5B5;) then both of these have a yellow background.

Running GTK+ 3.22.15 in Fedora 25

raveit65 commented 7 years ago

Ok, i am fine with with using a hardcoded color definition for theme_tooltip_bg_color in gtk-widget.css, As this definition is only used for tooltips and nothing else. Does this work if you edit gtk-widget.css here https://github.com/mate-desktop/mate-themes/blob/master/desktop-themes/Menta/gtk-3.0/gtk-widgets.css#L133 If yes, i will commit that.

ghost commented 7 years ago

Yes, simply replacing (in gtk-widgets.css) background-color: @theme_tooltip_bg_color; with background-color: #F5F5B5; where you indicated does solve the issue

ghost commented 7 years ago

After all that I see that this issue may become moot with the next eclipse (Oxygen) http://www.eclipse.org/oxygen/noteworthy/#platform-linux

Consistent Javadoc colors usage under Linux

The Javadoc color usage on Linux was inconsistent since GTK 3.04. This has been resolved and support for Javadoc on the Eclipse Dark Theme has been added.

Before: i1 After: i2

lukefromdc commented 7 years ago

This document shows we are indeed dealing with a direct read of a GTK theme's css and not with GTK itself. As such, it's a bug in Eclipse (that they intend to fix) and not really in our theme unless we explicitly support the current version of Eclipse(a 1 line change).

raveit65 commented 7 years ago

@Heterodyne Can you please give us a hint if this work arround isn't needed any more? But i am guessing we have to live with it for years because of always old and obsoleted debian ;-)

ghost commented 7 years ago

I would say yes ... Until the new Eclipse (Oxygen) is available I'm not able to test whether the issue is actually fixed. In any case the older versions will be around for some time so the fix is relevant.

From a philosophical perspective since this is really an Eclipse issue I wouldn't blame you for not changing it. Then again, since it wouldn't have any second order effects, it would be a nice thing to do 8-)