Bug 542776 - Tooltip black background and grey font is unreadable
Summary: Tooltip black background and grey font is unreadable
Status: NEW
Alias: None
Product: Tracecompass
Classification: Tools
Component: LTTng (show other bugs)
Version: 4.1.0   Edit
Hardware: PC Linux
: P3 major
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Project Inbox CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-13 12:30 EST by Aleix Roca Nonell CLA
Modified: 2018-12-17 13:56 EST (History)
2 users (show)

See Also:


Attachments
The attachment shows an unreadable black rectangle that used to be a useful tooltip. (320.83 KB, image/png)
2018-12-13 12:30 EST, Aleix Roca Nonell CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aleix Roca Nonell CLA 2018-12-13 12:30:11 EST
Created attachment 276929 [details]
The attachment shows an unreadable black rectangle that used to be a useful tooltip.

The tooltip that appears when hovering the mouse over the trace compass views has a black background and grey text which is almost unreadable. The tooltip still has the usual yellowish background on the disk view.
Comment 1 Matthew Khouzam CLA 2018-12-13 13:56:10 EST
Comment on attachment 276929 [details]
The attachment shows an unreadable black rectangle that used to be a useful tooltip.

I've had this before, I think it's a problem with the GTK themes... I will bring this up, but a workaround I did was to set the tooltip background to default instead of Ubuntu default.
Comment 2 Matthew Khouzam CLA 2018-12-13 13:56:32 EST
Setting to new as it is confirmed.
Comment 3 Aleix Roca Nonell CLA 2018-12-14 03:40:39 EST
Hi Matthew!

I have not been able to find the background setting under

window->preferences->General->appearence->Colors and fonts

But I confirm that changing the theme from "light" to "dark" solved the tooltip problem (although it looks quite ugly...). Thanks for the tip! :)
Comment 4 Matthew Khouzam CLA 2018-12-14 10:15:38 EST
Hey Aleix,

Here is how to do it, I'm not sure if this counts as a Linux or Eclipse platform bug, I will investigate shortly. If it is eclipse platform, I'm pretty sure I can fix it. :)

https://askubuntu.com/questions/35491/how-to-change-tooltips-background-color-in-xfce
Comment 5 Aleix Roca Nonell CLA 2018-12-14 11:21:35 EST
Hi Matthew!

I returned to the "light" theme and tried your workaround (gnome-color-chooser variant) but no luck, the tooltip's background is still black. It's a bit weird that the tooltips of the control flow view, the resources view and my custom xml views are black but the tooltip of the I/O disk view looks fine, no? :O

Just for the record, I'm using Linux Mint 17.3 with cinnamon. After changing the settings I rebooted, cinnamon crashed once and then worked fine. Further reboots did not cause a crash though.
Comment 6 Patrick Tasse CLA 2018-12-14 12:14:14 EST
Hi Aleix,

The time graph views create their own tool tip shells and use SWT.COLOR_INFO_BACKGROUND and SWT.COLOR_INFO_FOREGROUND system colors to set the background and foreground on the Labels that draw text on the shell.

The XY chart just uses setToolTipText() on the Control and it is GTK's tool tip colors that are used.

The Javadoc for SWT's constants says "System color used to paint tooltip text/background areas" so I'm not sure where the discrepancy occurs.

Are you able to debug in Display.initializeSystemColors() and Display.gtk_css_default_theme_values_irregular() how are COLOR_INFO_BACKGROUND_RGBA and COLOR_INFO_FOREGROUND_RGBA initialized?
Comment 7 Patrick Tasse CLA 2018-12-14 15:20:19 EST
For reference, in my case with GTK 3.10.8:

In Display.initializeSystemColors():

COLOR_INFO_FOREGROUND_RGBA = GdkRGBA {255, 255, 255, 255} from styleContextGetColor()

COLOR_INFO_BACKGROUND_RGBA = GdkRGBA {16, 16, 16, 255} from getBackgroundColor()

and Display.gtk_css_default_theme_values_irregular() doesn't get called.
Comment 8 Aleix Roca Nonell CLA 2018-12-17 13:23:49 EST
Hi Patrick!

Sorry, I'm a bit newbie with GUIs and GTK, where can I find the Display.initializeSystemColors() function? I did a grep on trace compass but I couldn't find anything.
Comment 9 Patrick Tasse CLA 2018-12-17 13:56:28 EST
To debug this you would typically use Debug Configurations > Eclipse Application.

The class Display is in org.eclipse.swt plug-in, if you have any UI plug-in in your workspace you should find it under Plug-In Dependencies. Or Ctrl+Shift+T.