On Tue, 23 Jul 2024 08:23:50 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

>> Issue is due to the condition added for the opaque property of 
>> SynthTabbedPane in 
>> [JDK-8226990](https://bugs.openjdk.org/browse/JDK-8226990). The previous fix 
>> for GTK and Nimbus was handled commonly in `SynthTabbedPaneUI` class to 
>> render the tabs based on opaque property. Since the Synth package is 
>> responsible to create a custom L&F using user defined XML file. In this test 
>> the L&F is fetched through the XML file and when `SynthTabbedPaneUI` APIs 
>> are invoked for the tab rendering, it is not correctly rendered. Setting the 
>> opaque property to true also doesn't help as the selected tab is rendered 
>> incorrectly. The proposed fix is to move the fix to GTK and Nimbus specific 
>> class and that will not cause any impact on custom xml based L&F.
>
> src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java 
> line 656:
> 
>> 654:         }
>> 655: 
>> 656:         
>> tabContext.getPainter().paintTabbedPaneTabBackground(tabContext, g,
> 
> what about the check `tabPane.isOpaque()))` in l764, will it still be needed?

Yeah, it is still needed. If `contentOpaque` property is set to `false` but 
tabPane opacity is set to `true`, then the content area needs to fill with the 
set graphics color.

By default `tabPane.isOpaque()` return `false`, it depends on the contentOpaque 
property to have a effect on content area background filling.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20091#discussion_r1701333467

Reply via email to