<Swing Dev> [13] RFR JDK-8214253: Tooltip is transparent rather than having a black background
Pankaj Bansal
pankaj.b.bansal at oracle.com
Tue Mar 5 07:02:35 UTC 2019
Hi Prasanta,
<<One question, dont we need to do
<<1782 fp_gtk_style_context_add_class(context, "background");
<<after
<<2366 context = get_style(widget_type, "tooltip");
The tooltip is drawn in two parts, tooltip background and tooltip text. Tooltip background is drawn using gtk3_paint_flat_box. The text color is found by gtk3_get_color_for_state. In the css file [1], for drawing the toolkit background, background class is added to the tooltip style, so this is done in gtk3_paint_flat_box. But to find the text color, this is not needed. So this is not done in gtk3_get_color_for_state.
<< Also,please put noreg-demo in JBS since you are not providing any testcase. Applicable for all gtk3 bugs, I presume.
Done. I will add this to other bugs too.
[1] https://github.com/GNOME/gtk/blob/gtk-3-22/gtk/theme/Adwaita/gtk-contained.css
-Pankaj
From: Prasanta Sadhukhan
Sent: Tuesday, March 5, 2019 9:04 AM
To: Pankaj Bansal; swing-dev at openjdk.java.net
Subject: Re: <Swing Dev> [13] RFR JDK-8214253: Tooltip is transparent rather than having a black background
Hi Pankaj,
One question, dont we need to do
1782 fp_gtk_style_context_add_class(context, "background");
after
2366 context = get_style(widget_type, "tooltip");
Also,please put noreg-demo in JBS since you are not providing any testcase. Applicable for all gtk3 bugs, I presume.
Regards
Prasanta
On 01-Mar-19 1:25 PM, Pankaj Bansal wrote:
Hi All,
Please review the following fix.
Bug:
https://bugs.openjdk.java.net/browse/JDK-8214253
webrev
HYPERLINK "http://cr.openjdk.java.net/%7Epbansal/8214253/webrev00/"http://cr.openjdk.java.net/~pbansal/8214253/webrev00/
Issue:
>From gtk 3.20, gtk has changed the way themes and styles work for many widgets. Due to which, jdk is not able to render some widgets properly including JTooltip. The tooltip background looks transparent, but tooltip background is of same color as background panel.
gtk 3.20 release notes: https://developer.gnome.org/gtk3/stable/ch32s10.html
Fix:
This patch fixes rendering issues in JTooltip by using correct way to define styles.
Testing:
This fix can be verified by running SwingSet2 and using the tooltip. I have verified this on Ubuntu 16.04, 18.04, 18.10 and OEL 7.5.
Regards,
Pankaj Bansal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20190304/a628e877/attachment-0001.html>
More information about the swing-dev
mailing list